mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-26 23:13:13 +02:00
sectionsd: consider the table_id when inserting events
Signed-off-by: Jacek Jendrzej <crashdvb@googlemail.com>
This commit is contained in:
committed by
Jacek Jendrzej
parent
4dbeb3a31e
commit
5db16ee2ff
@@ -5,7 +5,7 @@
|
||||
* Copyright (C) 2001 by fnbrd (fnbrd@gmx.de)
|
||||
* Homepage: http://dbox2.elxsi.de
|
||||
*
|
||||
* Copyright (C) 2008, 2009 Stefan Seyfried
|
||||
* Copyright (C) 2008-2013 Stefan Seyfried
|
||||
*
|
||||
* Copyright (C) 2011-2012 CoolStream International Ltd
|
||||
*
|
||||
@@ -408,9 +408,16 @@ xprintf("addEvent: current %016" PRIx64 " event %016" PRIx64 " running %d messag
|
||||
else
|
||||
{
|
||||
event_id_t x_key = (*x)->uniqueKey();
|
||||
/* do we need this check? */
|
||||
if (x_key == e_key)
|
||||
continue;
|
||||
{
|
||||
/* the present event has a higher table_id than the new one
|
||||
* => delete and insert the new one */
|
||||
if ((*x)->table_id >= e->table_id)
|
||||
continue;
|
||||
/* else: keep the old event with the lower table_id */
|
||||
unlockEvents();
|
||||
return;
|
||||
}
|
||||
if ((*x)->times.begin()->startzeit >= end_time)
|
||||
continue;
|
||||
/* iterating backwards: if the endtime of the stored events
|
||||
@@ -418,6 +425,14 @@ xprintf("addEvent: current %016" PRIx64 " event %016" PRIx64 " running %d messag
|
||||
* find an identical one => bail out */
|
||||
if ((*x)->times.begin()->startzeit + (long)(*x)->times.begin()->dauer <= start_time)
|
||||
break;
|
||||
if ((*x)->table_id < e->table_id)
|
||||
{
|
||||
/* don't add the higher table_id */
|
||||
dprintf("%s: don't replace 0x%016" PRIx64 ".%02x with 0x%016" PRIx64 ".%02x\n",
|
||||
__func__, x_key, (*x)->table_id, e_key, e->table_id);
|
||||
unlockEvents();
|
||||
return;
|
||||
}
|
||||
/* here we have an overlapping event */
|
||||
dprintf("%s: delete 0x%016" PRIx64 ".%02x time = 0x%016" PRIx64 ".%02x\n", __func__,
|
||||
x_key, (*x)->table_id, e_key, e->table_id);
|
||||
|
Reference in New Issue
Block a user