Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
epggrab: otamux - fix endless loop in kick_cb
  • Loading branch information
perexg committed Nov 30, 2015
1 parent bf3c7f0 commit fc4497c
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/epggrab/otamux.c
Expand Up @@ -456,7 +456,8 @@ epggrab_ota_kick_cb ( void *p )
mpegts_mux_t *mm;
struct {
mpegts_network_t *net;
int failed;
uint8_t failed;
uint8_t fatal;
} networks[64], *net; /* more than 64 networks? - you're a king */
int i, r, networks_count = 0, epg_flag, kick = 1;
const char *modname;
Expand Down Expand Up @@ -498,6 +499,8 @@ epggrab_ota_kick_cb ( void *p )
for (i = 0, net = NULL; i < networks_count; i++) {
net = &networks[i];
if (net->net == mm->mm_network) {
if (net->fatal)
goto done;
if (net->failed) {
TAILQ_INSERT_TAIL(&epggrab_ota_pending, om, om_q_link);
om->om_q_type = EPGGRAB_OTA_MUX_PENDING;
Expand Down Expand Up @@ -561,11 +564,11 @@ epggrab_ota_kick_cb ( void *p )
om->om_q_type = EPGGRAB_OTA_MUX_PENDING;
if (r == SM_CODE_NO_FREE_ADAPTER)
net->failed = 1;
if (first == NULL)
first = om;
} else {
net->failed = 1;
net->fatal = 1;
}
if (first == NULL)
first = om;
} else {
tvhtrace("epggrab", "mux %p started", mm);
kick = 0;
Expand Down

0 comments on commit fc4497c

Please sign in to comment.