From: Adam Sutton Date: Mon, 4 Feb 2013 15:19:47 +0000 (+0000) Subject: Fix #1591 - timeshift: fix mutex deadlock affecting on-demand mode. X-Git-Tag: v3.5~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b359144b7cf975ceeaab724de00a57633dc522f0;p=thirdparty%2Ftvheadend.git Fix #1591 - timeshift: fix mutex deadlock affecting on-demand mode. Note: there is still an issue I've realised in that writer_flush() could potentially result in a single packet being written out of order as two threads have the potential to write. This isn't fatal and is probably rare enough to ignore at this stage. --- diff --git a/src/timeshift/timeshift_reader.c b/src/timeshift/timeshift_reader.c index d6b119418..2e5d1d2f6 100644 --- a/src/timeshift/timeshift_reader.c +++ b/src/timeshift/timeshift_reader.c @@ -777,7 +777,6 @@ void *timeshift_reader ( void *p ) /* Flush unwanted */ } else if (ts->ondemand && cur_file) { pthread_mutex_lock(&ts->rdwr_mutex); - timeshift_writer_flush(ts); timeshift_filemgr_flush(ts, cur_file); pthread_mutex_unlock(&ts->rdwr_mutex); }