]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
service: do not stop the raw service streaming when service is not enabled
authorJaroslav Kysela <perex@perex.cz>
Sat, 24 Nov 2018 20:10:48 +0000 (21:10 +0100)
committerJaroslav Kysela <perex@perex.cz>
Sat, 24 Nov 2018 20:10:48 +0000 (21:10 +0100)
src/service.c

index 301aef65426ff149a0b725d80f748e22d3e4752a..7738e9b31d8d631c2b48ed55d6edea295d590224 100644 (file)
@@ -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 {