From: BtbN Date: Tue, 15 Jan 2013 22:53:55 +0000 (+0100) Subject: Fix assertion in reaper thread X-Git-Tag: v3.5~86^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d5858b0b50e6073a2f520ecaf01338c93fb7aefb;p=thirdparty%2Ftvheadend.git Fix assertion in reaper thread --- diff --git a/src/timeshift/timeshift_filemgr.c b/src/timeshift/timeshift_filemgr.c index 9260e81cb..4b90eb60d 100644 --- a/src/timeshift/timeshift_filemgr.c +++ b/src/timeshift/timeshift_filemgr.c @@ -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(×hift_size_lock); + timeshift_total_size += r; + pthread_mutex_unlock(×hift_size_lock); + } close(tsf->fd); tsf->fd = -1; }