From: Adam Sutton Date: Wed, 22 Aug 2012 09:50:15 +0000 (+0100) Subject: Ensure that long stay on a mux does not result in no EPG updates. X-Git-Tag: 3.3~134 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b964ce05cd00d4efe0f694499ff4d365e12de00a;p=thirdparty%2Ftvheadend.git Ensure that long stay on a mux does not result in no EPG updates. --- diff --git a/src/epggrab/otamux.c b/src/epggrab/otamux.c index 88717214c..c383eb318 100644 --- a/src/epggrab/otamux.c +++ b/src/epggrab/otamux.c @@ -238,9 +238,6 @@ epggrab_ota_mux_t *epggrab_ota_create time_t now; time(&now); ota->state = EPGGRAB_OTA_MUX_IDLE; - - /* Blocked */ - if (epggrab_ota_is_blocked(ota)) ota = NULL; } return ota; } @@ -395,8 +392,13 @@ void epggrab_ota_timeout ( epggrab_ota_mux_t *ota ) int epggrab_ota_is_complete ( epggrab_ota_mux_t *ota ) { - return ota->state == EPGGRAB_OTA_MUX_COMPLETE || - ota->state == EPGGRAB_OTA_MUX_TIMEDOUT; + if (ota->state == EPGGRAB_OTA_MUX_COMPLETE || + ota->state == EPGGRAB_OTA_MUX_TIMEDOUT) { + if (epggrab_ota_is_blocked(ota)) + return 1; + ota->state = EPGGRAB_OTA_MUX_IDLE; + } + return 0; } int epggrab_ota_is_blocked ( epggrab_ota_mux_t *ota )