static void satip_discovery_timer_cb(void *aux) { int i; if (!tvheadend_running) return; if (!upnp_running) { gtimer_arm(&satip_discovery_timer, satip_discovery_timer_cb, NULL, 1); return; } if (satip_discovery_service == NULL) { satip_discovery_service = upnp_service_create(upnp_service); if (satip_discovery_service) { satip_discovery_service->us_received = satip_discovery_service_received; satip_discovery_service->us_destroy = satip_discovery_service_destroy; } } if (satip_discovery_service) satip_discovery_send_msearch((void *)1); for (i = 0; i < satip_static_clients->num; i++) satip_discovery_static(satip_static_clients->str[i]); gtimer_arm(&satip_discovery_timer, satip_discovery_timer_cb, NULL, 3600); #undef MSG }
static void satip_discovery_static_timer_cb(void *aux) { int i; if (!tvheadend_running) return; for (i = 0; i < satip_static_clients->num; i++) satip_discovery_static(satip_static_clients->str[i]); gtimer_arm(&satip_discovery_static_timer, satip_discovery_static_timer_cb, NULL, 3600); }