gtimer_t epggrab_ota_kick_timer;
gtimer_t epggrab_ota_start_timer;
+int epggrab_ota_running;
int epggrab_ota_pending_flag;
pthread_mutex_t epggrab_ota_mutex;
int save = 0;
epggrab_ota_map_t *map;
+ if (!epggrab_ota_running)
+ return NULL;
+
if (ota == NULL) {
/* Find mux entry */
const char *uuid = idnode_uuid_as_str(&mm->mm_id);
{
epggrab_ota_svc_link_t *svcl;
- if (uuid == NULL)
+ if (uuid == NULL || !epggrab_ota_running)
return;
SKEL_ALLOC(epggrab_svc_link_skel);
epggrab_svc_link_skel->uuid = (char *)uuid;
epggrab_ota_service_del ( epggrab_ota_map_t *map, epggrab_ota_mux_t *ota,
epggrab_ota_svc_link_t *svcl, int save )
{
- if (svcl == NULL)
+ if (svcl == NULL || !epggrab_ota_running)
return;
epggrab_ota_service_trace(ota, svcl, "delete");
RB_REMOVE(&map->om_svcs, svcl, link);
}
htsmsg_destroy(c);
}
+
+ epggrab_ota_running = 1;
}
void
epggrab_ota_mux_t *ota;
pthread_mutex_lock(&global_lock);
+ epggrab_ota_running = 0;
while ((ota = TAILQ_FIRST(&epggrab_ota_active)) != NULL)
epggrab_ota_free(&epggrab_ota_active, ota);
while ((ota = TAILQ_FIRST(&epggrab_ota_pending)) != NULL)