Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
epggrab: ota - fix the stolen mux requeue
  • Loading branch information
perexg committed Nov 8, 2014
1 parent 9ed76a5 commit b11b218
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/epggrab.h
Expand Up @@ -203,9 +203,10 @@ struct epggrab_ota_mux
char *om_mux_uuid; ///< Soft-link to mux
LIST_HEAD(,epggrab_ota_map) om_modules; ///< List of linked mods

int om_done; ///< The full completion mark for this round
int om_complete; ///< Has completed a scan
int om_save; ///< something changed
uint8_t om_done; ///< The full completion mark for this round
uint8_t om_complete; ///< Has completed a scan
uint8_t om_requeue; ///< Requeue when stolen
uint8_t om_save; ///< something changed
gtimer_t om_timer; ///< Per mux active timer
gtimer_t om_data_timer; ///< Any EPG data seen?

Expand Down
4 changes: 3 additions & 1 deletion src/epggrab/otamux.c
Expand Up @@ -110,6 +110,7 @@ epggrab_ota_requeue ( void )
*/
RB_FOREACH(om, &epggrab_ota_all, om_global_link) {
om->om_done = 0;
om->om_requeue = 1;
if (om->om_q_type != EPGGRAB_OTA_MUX_IDLE)
continue;
TAILQ_INSERT_TAIL(&epggrab_ota_pending, om, om_q_link);
Expand Down Expand Up @@ -160,7 +161,7 @@ epggrab_ota_done ( epggrab_ota_mux_t *om, int reason )
om->om_q_type = EPGGRAB_OTA_MUX_IDLE;
if (reason == EPGGRAB_OTA_DONE_STOLEN) {
/* Do not requeue completed muxes */
if (!om->om_done) {
if (!om->om_done && om->om_requeue) {
TAILQ_INSERT_HEAD(&epggrab_ota_pending, om, om_q_link);
om->om_q_type = EPGGRAB_OTA_MUX_PENDING;
}
Expand Down Expand Up @@ -499,6 +500,7 @@ epggrab_ota_kick_cb ( void *p )
om->om_force_modname = modname ? strdup(modname) : NULL;

/* Subscribe to the mux */
om->om_requeue = 1;
if ((r = mpegts_mux_subscribe(mm, "epggrab", SUBSCRIPTION_PRIO_EPG))) {
TAILQ_INSERT_TAIL(&epggrab_ota_pending, om, om_q_link);
om->om_q_type = EPGGRAB_OTA_MUX_PENDING;
Expand Down

0 comments on commit b11b218

Please sign in to comment.