From: Jaroslav Kysela Date: Fri, 5 May 2017 11:04:00 +0000 (+0200) Subject: satip client: fix the dead-lock in satip_frontend_wake_other_waiting() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4217af65687b417dfc05ee5fb00cd0ef20a432f1;p=thirdparty%2Ftvheadend.git satip client: fix the dead-lock in satip_frontend_wake_other_waiting() --- diff --git a/src/input/mpegts/satip/satip_frontend.c b/src/input/mpegts/satip/satip_frontend.c index f2cf21818..5efb19dbf 100644 --- a/src/input/mpegts/satip/satip_frontend.c +++ b/src/input/mpegts/satip/satip_frontend.c @@ -1078,7 +1078,8 @@ satip_frontend_wake_other_waiting if ((lfe->sf_master && lfe2->sf_number != lfe->sf_master) || (lfe2->sf_master && lfe->sf_number != lfe2->sf_master)) continue; - pthread_mutex_lock(&lfe2->sf_dvr_lock); + while (pthread_mutex_trylock(&lfe2->sf_dvr_lock)) + tvh_usleep(1000); hash2 = lfe2->sf_req ? lfe2->sf_req->sf_netposhash : 0; if (hash2 != 0 && hash1 != hash2 && lfe2->sf_running) tvh_write(lfe2->sf_dvr_pipe.wr, "o", 1);