]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
satip client: fix the dead-lock in satip_frontend_wake_other_waiting()
authorJaroslav Kysela <perex@perex.cz>
Fri, 5 May 2017 11:04:00 +0000 (13:04 +0200)
committerJaroslav Kysela <perex@perex.cz>
Fri, 5 May 2017 11:04:00 +0000 (13:04 +0200)
src/input/mpegts/satip/satip_frontend.c

index f2cf2181877a2598e5b41b77efd7468471e90256..5efb19dbf7cf560bff24423fddb3f69f349c873e 100644 (file)
@@ -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);