]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Ensure that long stay on a mux does not result in no EPG updates.
authorAdam Sutton <dev@adamsutton.me.uk>
Wed, 22 Aug 2012 09:50:15 +0000 (10:50 +0100)
committerAdam Sutton <dev@adamsutton.me.uk>
Wed, 22 Aug 2012 20:45:56 +0000 (21:45 +0100)
src/epggrab/otamux.c

index 88717214cf0e6de7ea2c1225d7339d53970de05f..c383eb3185f27a56c0f007be72c683fb86c2ee7e 100644 (file)
@@ -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 )