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.
This commit is contained in:
Adam Sutton 2013-02-04 15:19:47 +00:00
parent fea99ba649
commit b359144b7c

View file

@ -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);
}