aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-09 19:17:38 +0200
committerEric Wong <normalperson@yhbt.net>2008-10-11 19:21:51 -0700
commite5c747982adfae06c51b60819ec6a4ef5a34ffe2 (patch)
treeaea367d18ebdad1140a576892ad43e803b52d3a6
parent0775237e40087ee328888eb2b16953dc0cb332e0 (diff)
downloadmpd-e5c747982adfae06c51b60819ec6a4ef5a34ffe2.tar.gz
mpd-e5c747982adfae06c51b60819ec6a4ef5a34ffe2.tar.xz
mpd-e5c747982adfae06c51b60819ec6a4ef5a34ffe2.zip
update: check progress!=IDLE in reap_update_task()
When the update task is idle, there is no need to check for deleted songs. Return early from reap_update_task().
Diffstat (limited to '')
-rw-r--r--src/update.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/update.c b/src/update.c
index 34ec1ba77..f5619a1d4 100644
--- a/src/update.c
+++ b/src/update.c
@@ -438,6 +438,9 @@ void reap_update_task(void)
assert(pthread_equal(pthread_self(), main_task));
+ if (progress == UPDATE_PROGRESS_IDLE)
+ return;
+
cond_enter(&delete_cond);
if (delete) {
char tmp[MPD_PATH_MAX];