sectionsd: -add replae event if new version

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1422 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
satbaby
2011-05-02 11:21:15 +00:00
parent e2634e2938
commit 517a305980
4 changed files with 13 additions and 3 deletions

View File

@@ -777,8 +777,12 @@ static void addEvent(const SIevent &evt, const unsigned table_id, const time_t z
readLockEvents();
MySIeventsOrderUniqueKey::iterator si = mySIeventsOrderUniqueKey.find(evt.uniqueKey());
bool already_exists = (si != mySIeventsOrderUniqueKey.end());
if (already_exists && (evt.table_id < si->second->table_id))
if (already_exists && ( (evt.table_id == si->second->table_id && evt.version != si->second->version) || evt.version == 0xFF || si->second->version == 0xFF ) )
{
//replae event if new version
already_exists = false;
}
else if (already_exists && (evt.table_id < si->second->table_id))
{
/* if the new event has a lower (== more recent) table ID, replace the old one */
already_exists = false;