From 1d6356a87b95bc2dbc8ca4645670a045fbbd1149 Mon Sep 17 00:00:00 2001 From: Adam Sutton Date: Sun, 20 Jan 2013 11:41:21 +0000 Subject: [PATCH] Issue #1532 - service: ensure that only fully enabled services are used. This uses the new s_is_enabled() callback routine to check if the service chain is completely enabled. For DVB services this will also check the container mux and adapter. --- src/service.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/service.c b/src/service.c index 67353021..a22eec77 100644 --- a/src/service.c +++ b/src/service.c @@ -335,7 +335,7 @@ service_find(channel_t *ch, unsigned int weight, const char *loginfo, cnt = 0; LIST_FOREACH(t, &ch->ch_services, s_ch_link) { - if(!t->s_enabled) { + if(!t->s_is_enabled(t)) { if(loginfo != NULL) { tvhlog(LOG_NOTICE, "Service", "%s: Skipping \"%s\" -- not enabled", loginfo, service_nicename(t)); @@ -1179,11 +1179,7 @@ service_is_primary_epg(service_t *svc) service_t *ret = NULL, *t; if (!svc || !svc->s_ch) return 0; LIST_FOREACH(t, &svc->s_ch->ch_services, s_ch_link) { - if (!t->s_dvb_mux_instance) continue; - if (!t->s_dvb_mux_instance->tdmi_enabled) continue; - if (!t->s_dvb_mux_instance->tdmi_adapter->tda_enabled) continue; - if (!t->s_dvb_mux_instance->tdmi_adapter->tda_rootpath) continue; - if (!t->s_enabled || !t->s_dvb_eit_enable) continue; + if (!t->s_is_enabled(t) || !t->s_dvb_eit_enable) continue; if (!ret || service_get_prio(t) < service_get_prio(ret)) ret = t; }