Don't attempt to schedule subscriptions every 2 seconds. 60 seconds is enough.
This commit is contained in:
parent
55c8d07791
commit
bf26e1918c
4 changed files with 17 additions and 5 deletions
|
@ -805,6 +805,8 @@ tdmi_set_enable(th_dvb_mux_instance_t *tdmi, int enabled)
|
|||
|
||||
if(enabled)
|
||||
mux_link_initial(tda, tdmi);
|
||||
|
||||
subscription_reschedule();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -128,11 +128,17 @@ subscription_unlink_transport(th_subscription_t *s, int reason)
|
|||
}
|
||||
|
||||
|
||||
static void
|
||||
subscription_reschedule_cb(void *aux)
|
||||
{
|
||||
subscription_reschedule();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
static void
|
||||
subscription_reschedule(void *aux)
|
||||
void
|
||||
subscription_reschedule(void)
|
||||
{
|
||||
th_subscription_t *s;
|
||||
th_transport_t *t, *skip;
|
||||
|
@ -141,7 +147,8 @@ subscription_reschedule(void *aux)
|
|||
int errorcode;
|
||||
lock_assert(&global_lock);
|
||||
|
||||
gtimer_arm(&subscription_reschedule_timer, subscription_reschedule, NULL, 2);
|
||||
gtimer_arm(&subscription_reschedule_timer,
|
||||
subscription_reschedule_cb, NULL, 60);
|
||||
|
||||
LIST_FOREACH(s, &subscriptions, ths_global_link) {
|
||||
if(s->ths_channel == NULL)
|
||||
|
@ -203,7 +210,7 @@ subscription_unsubscribe(th_subscription_t *s)
|
|||
free(s->ths_title);
|
||||
free(s);
|
||||
|
||||
subscription_reschedule(NULL);
|
||||
subscription_reschedule();
|
||||
}
|
||||
|
||||
|
||||
|
@ -311,7 +318,7 @@ subscription_create_from_channel(channel_t *ch, unsigned int weight,
|
|||
LIST_INSERT_HEAD(&ch->ch_subscriptions, s, ths_channel_link);
|
||||
s->ths_transport = NULL;
|
||||
|
||||
subscription_reschedule(NULL);
|
||||
subscription_reschedule();
|
||||
|
||||
if(s->ths_transport == NULL) {
|
||||
tvhlog(LOG_NOTICE, "subscription",
|
||||
|
|
|
@ -63,6 +63,8 @@ void subscription_unsubscribe(th_subscription_t *s);
|
|||
|
||||
void subscription_set_weight(th_subscription_t *s, unsigned int weight);
|
||||
|
||||
void subscription_reschedule(void);
|
||||
|
||||
th_subscription_t *subscription_create_from_channel(channel_t *ch,
|
||||
unsigned int weight,
|
||||
const char *name,
|
||||
|
|
|
@ -889,6 +889,7 @@ transport_set_enable(th_transport_t *t, int enabled)
|
|||
|
||||
t->tht_enabled = enabled;
|
||||
t->tht_config_save(t);
|
||||
subscription_reschedule();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue