Fix the subscription_done() call

The subscription_unsubscribe() must be called from the upper layer (like dvr).
This commit is contained in:
Jaroslav Kysela 2014-03-14 20:07:38 +01:00
parent 4718b8efaf
commit 1e11bc8c19
2 changed files with 2 additions and 7 deletions

View file

@ -854,12 +854,12 @@ main(int argc, char **argv)
tvhftrace("main", epggrab_done);
tvhftrace("main", tcp_server_done);
tvhftrace("main", subscription_done);
tvhftrace("main", descrambler_done);
tvhftrace("main", service_mapper_done);
tvhftrace("main", service_done);
tvhftrace("main", channel_done);
tvhftrace("main", dvr_done);
tvhftrace("main", subscription_done);
tvhftrace("main", access_done);
tvhftrace("main", epg_done);
tvhftrace("main", avahi_done);

View file

@ -763,12 +763,7 @@ subscription_init(void)
void
subscription_done(void)
{
th_subscription_t *s;
pthread_mutex_lock(&global_lock);
while ((s = LIST_FIRST(&subscriptions)) != NULL)
subscription_unsubscribe(s);
pthread_mutex_unlock(&global_lock);
assert(LIST_FIRST(&subscriptions) == NULL);
}
/* **************************************************************************