]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Fix assertion in reaper thread 228/head
authorBtbN <btbn@btbn.de>
Tue, 15 Jan 2013 22:53:55 +0000 (23:53 +0100)
committerBtbN <btbn@btbn.de>
Tue, 15 Jan 2013 22:53:55 +0000 (23:53 +0100)
src/timeshift/timeshift_filemgr.c

index 9260e81cbf0453a5ec6afa55523080a2247ccdbb..4b90eb60db1e5a0f2005df88c1c70d09a1e2f8aa 100644 (file)
@@ -149,7 +149,12 @@ void timeshift_filemgr_close ( timeshift_file_t *tsf )
 {
   ssize_t r = timeshift_write_eof(tsf->fd);
   if (r > 0)
+  {
     tsf->size += r;
+    pthread_mutex_lock(&timeshift_size_lock);
+    timeshift_total_size += r;
+    pthread_mutex_unlock(&timeshift_size_lock);
+  }
   close(tsf->fd);
   tsf->fd = -1;
 }