mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-31 01:11:12 +02:00
-fix event version handling
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1427 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -777,9 +777,10 @@ static void addEvent(const SIevent &evt, const unsigned table_id, const time_t z
|
|||||||
readLockEvents();
|
readLockEvents();
|
||||||
MySIeventsOrderUniqueKey::iterator si = mySIeventsOrderUniqueKey.find(evt.uniqueKey());
|
MySIeventsOrderUniqueKey::iterator si = mySIeventsOrderUniqueKey.find(evt.uniqueKey());
|
||||||
bool already_exists = (si != mySIeventsOrderUniqueKey.end());
|
bool already_exists = (si != mySIeventsOrderUniqueKey.end());
|
||||||
if (already_exists && ( (evt.table_id == si->second->table_id && evt.version != si->second->version) || evt.version == 0xFF || si->second->version == 0xFF ) )
|
if (already_exists && ( (evt.table_id == si->second->table_id && evt.version > si->second->version ) || si->second->version == 0xFF ) )
|
||||||
{
|
{
|
||||||
//replace event if new version
|
//replace event if new version
|
||||||
|
dprintf("replacing event version old 0x%02x new 0x%02x'\n", si->second->version, evt.version );
|
||||||
already_exists = false;
|
already_exists = false;
|
||||||
}
|
}
|
||||||
else if (already_exists && (evt.table_id < si->second->table_id))
|
else if (already_exists && (evt.table_id < si->second->table_id))
|
||||||
|
Reference in New Issue
Block a user