]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
subscription: fix the oneshot override subscription cleanup
authorJaroslav Kysela <perex@perex.cz>
Sun, 31 May 2015 09:27:59 +0000 (11:27 +0200)
committerJaroslav Kysela <perex@perex.cz>
Sun, 31 May 2015 09:35:08 +0000 (11:35 +0200)
src/subscriptions.c

index dcedda2ca9a0edde9ab67f16286263779e74e62d..c20968f2e93c2b2a4a8611b236d83c63616ba092 100644 (file)
@@ -142,6 +142,9 @@ subscription_unlink_service0(th_subscription_t *s, int reason, int stop)
 
   LIST_REMOVE(s, ths_service_link);
   s->ths_service = NULL;
+
+  if (stop && (s->ths_flags & SUBSCRIPTION_ONESHOT) != 0)
+    subscription_unsubscribe(s, 0);
 }
 
 void
@@ -584,6 +587,7 @@ subscription_unsubscribe(th_subscription_t *s, int quiet)
   tvhlog(quiet ? LOG_TRACE : LOG_INFO, "subscription", "%04X: %s", shortid(s), buf);
 
   if (t) {
+    s->ths_flags &= ~SUBSCRIPTION_ONESHOT;
     service_remove_subscriber(t, s, SM_CODE_OK);
   }