When deleting IPTV source, also delete configuration on disk

Ticket #253
This commit is contained in:
Andreas Öman 2010-08-18 12:22:49 +00:00
parent 198e86ca9f
commit d165672b32
3 changed files with 16 additions and 0 deletions

View file

@ -371,6 +371,16 @@ iptv_grace_period(th_transport_t *t)
}
/**
*
*/
static void
iptv_transport_dtor(th_transport_t *t)
{
hts_settings_remove("iptvtransports/%s", t->tht_identifier);
}
/**
*
*/
@ -411,6 +421,7 @@ iptv_transport_find(const char *id, int create)
t->tht_setsourceinfo = iptv_transport_setsourceinfo;
t->tht_quality_index = iptv_transport_quality;
t->tht_grace_period = iptv_grace_period;
t->tht_dtor = iptv_transport_dtor;
t->tht_iptv_fd = -1;
LIST_INSERT_HEAD(&iptv_all_transports, t, tht_group_link);

View file

@ -435,6 +435,9 @@ transport_destroy(th_transport_t *t)
th_subscription_t *s;
channel_t *ch = t->tht_ch;
if(t->tht_dtor != NULL)
t->tht_dtor(t);
lock_assert(&global_lock);
serviceprobe_delete(t);

View file

@ -571,6 +571,8 @@ typedef struct th_transport {
int (*tht_grace_period)(struct th_transport *t);
void (*tht_dtor)(struct th_transport *t);
/*
* Per source type structs
*/