From 8d83e4fdba079000fe19fb795e57333aaba05c03 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 23 Sep 2008 02:49:28 -0700 Subject: Revert "directory: serialize freeSong() within the main thread" This reverts commit efefaee1f9535012be2fbfea8f0f870904daad5d. Conflicts: src/directory.c --- src/directory.c | 10 +--------- 1 file changed, 1 insertion(+), 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 */ } } -- cgit v1.2.3