From: Jaroslav Kysela Date: Sat, 24 Nov 2018 20:10:48 +0000 (+0100) Subject: service: do not stop the raw service streaming when service is not enabled X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=08df6feea5f2a07eeace142484c944377b5f6858;p=thirdparty%2Ftvheadend.git service: do not stop the raw service streaming when service is not enabled --- diff --git a/src/service.c b/src/service.c index 301aef654..7738e9b31 100644 --- a/src/service.c +++ b/src/service.c @@ -303,9 +303,13 @@ service_remove_subscriber(service_t *t, th_subscription_t *s, int reason) { lock_assert(&global_lock); + th_subscription_t *s_next; if(s == NULL) { - while((s = LIST_FIRST(&t->s_subscriptions)) != NULL) { + for (s = LIST_FIRST(&t->s_subscriptions); s; s = s_next) { + s_next = LIST_NEXT(s, ths_service_link); + if (reason == SM_CODE_SVC_NOT_ENABLED && s->ths_channel == NULL) + continue; /* not valid for raw service subscriptions */ subscription_unlink_service(s, reason); } } else {