Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
subscription: fix the wrong raw service removal
  • Loading branch information
perexg committed Oct 18, 2015
1 parent 4cf71bb commit 00031a8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/service.c
Expand Up @@ -305,7 +305,7 @@ void
service_stop(service_t *t)
{
elementary_stream_t *st;

gtimer_disarm(&t->s_receive_timer);

t->s_stop_feed(t);
Expand Down
6 changes: 4 additions & 2 deletions src/subscriptions.c
Expand Up @@ -558,11 +558,13 @@ subscription_unsubscribe(th_subscription_t *s, int quiet)
service_t *t;
char buf[512];
size_t l = 0;
service_t *raw;

if (s == NULL)
return;

t = s->ths_service;
raw = s->ths_raw_service;

lock_assert(&global_lock);

Expand All @@ -574,7 +576,7 @@ subscription_unsubscribe(th_subscription_t *s, int quiet)
LIST_SAFE_REMOVE(s, ths_remove_link);

#if ENABLE_MPEGTS
if (s->ths_raw_service)
if (raw)
LIST_REMOVE(s, ths_mux_link);
#endif

Expand All @@ -600,7 +602,7 @@ subscription_unsubscribe(th_subscription_t *s, int quiet)
}

#if ENABLE_MPEGTS
if (s->ths_raw_service)
if (raw)
service_remove_raw(s->ths_raw_service);
#endif

Expand Down

0 comments on commit 00031a8

Please sign in to comment.