From: Jaroslav Kysela Date: Tue, 30 Jan 2018 12:43:32 +0000 (+0100) Subject: capmt: add running check to wait loop X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea25f9a97d01337537c4723ac8bfa813f7b05805;p=thirdparty%2Ftvheadend.git capmt: add running check to wait loop --- diff --git a/src/descrambler/capmt.c b/src/descrambler/capmt.c index 571bf8d4f..a20ce765b 100644 --- a/src/descrambler/capmt.c +++ b/src/descrambler/capmt.c @@ -1948,7 +1948,7 @@ capmt_thread(void *aux) i = tvh_cond_timedwait(&capmt->capmt_cond, &capmt->capmt_mutex, mono); if (i == ETIMEDOUT) break; - } while (ERRNO_AGAIN(i)); + } while (ERRNO_AGAIN(i) && atomic_get(&capmt->capmt_running)); pthread_mutex_unlock(&capmt->capmt_mutex); }