Ensure channelUpdate message is generated before previously referenced events are deleted.
This commit is contained in:
parent
f214bb27e9
commit
376e33d0ed
1 changed files with 8 additions and 2 deletions
10
src/epg.c
10
src/epg.c
|
@ -1364,8 +1364,10 @@ static void _epg_channel_timer_callback ( void *p )
|
||||||
channel_t *ch = (channel_t*)p;
|
channel_t *ch = (channel_t*)p;
|
||||||
|
|
||||||
/* Clear now/next */
|
/* Clear now/next */
|
||||||
cur = ch->ch_epg_now;
|
if ((cur = ch->ch_epg_now))
|
||||||
nxt = ch->ch_epg_next;
|
cur->getref(cur);
|
||||||
|
if ((nxt = ch->ch_epg_next))
|
||||||
|
nxt->getref(nxt);
|
||||||
ch->ch_epg_now = ch->ch_epg_next = NULL;
|
ch->ch_epg_now = ch->ch_epg_next = NULL;
|
||||||
|
|
||||||
/* Check events */
|
/* Check events */
|
||||||
|
@ -1412,6 +1414,10 @@ static void _epg_channel_timer_callback ( void *p )
|
||||||
ch->ch_name);
|
ch->ch_name);
|
||||||
htsp_channel_update_current(ch);
|
htsp_channel_update_current(ch);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Remove refs */
|
||||||
|
if (cur) cur->putref(cur);
|
||||||
|
if (nxt) nxt->putref(nxt);
|
||||||
}
|
}
|
||||||
|
|
||||||
static epg_broadcast_t *_epg_channel_add_broadcast
|
static epg_broadcast_t *_epg_channel_add_broadcast
|
||||||
|
|
Loading…
Add table
Reference in a new issue