If all services tied to a channel is deleted, delete the channel too.
It seems reasonable after all. Ticket #253
This commit is contained in:
parent
0d127d368c
commit
198e86ca9f
1 changed files with 7 additions and 1 deletions
|
@ -433,7 +433,8 @@ transport_destroy(th_transport_t *t)
|
|||
{
|
||||
th_stream_t *st;
|
||||
th_subscription_t *s;
|
||||
|
||||
channel_t *ch = t->tht_ch;
|
||||
|
||||
lock_assert(&global_lock);
|
||||
|
||||
serviceprobe_delete(t);
|
||||
|
@ -469,6 +470,11 @@ transport_destroy(th_transport_t *t)
|
|||
free(t->tht_pmt_section);
|
||||
|
||||
transport_unref(t);
|
||||
|
||||
if(ch != NULL) {
|
||||
if(LIST_FIRST(&ch->ch_transports) == NULL)
|
||||
channel_delete(ch);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue