]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
timeshift: Reworked mutex locking in timeshift_filemgr.c 386/head
authorJoerg Werner <schreibubi@gmail.com>
Sun, 11 May 2014 12:31:27 +0000 (14:31 +0200)
committerJoerg Werner <schreibubi@gmail.com>
Sun, 11 May 2014 14:08:48 +0000 (16:08 +0200)
src/timeshift/timeshift_filemgr.c

index ee6ebcc97ad662737260d0b9473530f7ae870b1e..d33be2810fbd5ad8e33936a1c488f186eb188598 100644 (file)
@@ -73,6 +73,8 @@ static void* timeshift_reaper_callback ( void *p )
         tvhlog(LOG_ERR, "timeshift", "failed to remove %s [e=%s]",
                dpath, strerror(errno));
 
+    pthread_mutex_lock(&timeshift_reaper_lock);
+
     /* Free memory */
     while ((ti = TAILQ_FIRST(&tsf->iframes))) {
       TAILQ_REMOVE(&tsf->iframes, ti, link);