diff options
author | Eric Wong <normalperson@yhbt.net> | 2008-09-23 02:49:28 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-09-23 02:49:28 -0700 |
commit | 8d83e4fdba079000fe19fb795e57333aaba05c03 (patch) | |
tree | a3607fad9779e92fa39194cc0ead623568bee042 | |
parent | 401f568b218308a8d798d96a27248b474324ee99 (diff) | |
download | mpd-8d83e4fdba079000fe19fb795e57333aaba05c03.tar.gz mpd-8d83e4fdba079000fe19fb795e57333aaba05c03.tar.xz mpd-8d83e4fdba079000fe19fb795e57333aaba05c03.zip |
Revert "directory: serialize freeSong() within the main thread"
This reverts commit efefaee1f9535012be2fbfea8f0f870904daad5d.
Conflicts:
src/directory.c
Diffstat (limited to '')
-rw-r--r-- | src/directory.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/directory.c b/src/directory.c index 40acfa746..ca6ef8666 100644 --- a/src/directory.c +++ b/src/directory.c @@ -68,8 +68,6 @@ static pthread_t update_thr; static int directory_updateJobId; -static struct songvec reap_songs; - static DirectoryList *newDirectoryList(void); static int addToDirectory(Directory * directory, @@ -127,12 +125,6 @@ void reap_update_task(void) { if (progress != UPDATE_PROGRESS_DONE) return; - if (reap_songs.base) { - int i; - for (i = reap_songs.nr; --i >= 0; ) - freeSong(reap_songs.base[i]); - songvec_free(&reap_songs); - } pthread_join(update_thr, NULL); progress = UPDATE_PROGRESS_IDLE; } @@ -249,7 +241,7 @@ static void removeSongFromDirectory(Directory * directory, const char *shortname char path_max_tmp[MPD_PATH_MAX]; /* wasteful */ LOG("removing: %s\n", get_song_url(path_max_tmp, song)); songvec_delete(&directory->songs, song); - songvec_add(&reap_songs, song); + freeSong(song); /* FIXME racy */ } } |