From: Jaroslav Kysela Date: Sun, 31 May 2015 09:27:59 +0000 (+0200) Subject: subscription: fix the oneshot override subscription cleanup X-Git-Tag: v4.2.1~2413 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=81c356ce1d5e810486a0620cdfb6d76b92c78402;p=thirdparty%2Ftvheadend.git subscription: fix the oneshot override subscription cleanup --- diff --git a/src/subscriptions.c b/src/subscriptions.c index dcedda2ca..c20968f2e 100644 --- a/src/subscriptions.c +++ b/src/subscriptions.c @@ -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); }