revert to rev. 1387

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1390 e54a6e83-5905-42d5-8d5c-058d10e6a962


Origin commit data
------------------
Commit: 6395258913
Author: gixxpunk <thomas.harfmann@gmail.com>
Date: 2011-04-11 (Mon, 11 Apr 2011)

Origin message was:
------------------
- revert to rev. 1387

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1390 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
gixxpunk
2011-04-11 15:01:24 +00:00
parent c9f93e6417
commit f8c9233107

View File

@@ -1215,6 +1215,7 @@ static void removeDupEvents(void)
readLockEvents();
e1 = mySIeventsOrderServiceUniqueKeyFirstStartTimeEventUniqueKey.begin();
while ((e1 != mySIeventsOrderServiceUniqueKeyFirstStartTimeEventUniqueKey.end()) && !messaging_zap_detected)
{
e2 = e1;
@@ -1226,28 +1227,29 @@ static void removeDupEvents(void)
if ((*e1)->get_channel_id() != (*e2)->get_channel_id())
continue;
/* check for same time */
if ((*e1)->times.begin()->startzeit != (*e2)->times.begin()->startzeit)
if (((*e1)->times.begin()->startzeit != (*e2)->times.begin()->startzeit) ||
((*e1)->times.begin()->dauer != (*e2)->times.begin()->dauer))
continue;
if ((*e1)->table_id == (*e2)->table_id)
{
xprintf("%s: not removing events %llx %llx, t:%02x '%s'\n", __func__,
(*e1)->uniqueKey(), (*e2)->uniqueKey(), (*e1)->table_id, (*e1)->getName().c_str());
continue;
}
del = mySIeventsOrderServiceUniqueKeyFirstStartTimeEventUniqueKey.end();
if ((*e1)->table_id > (*e2)->table_id){
if ((*e1)->table_id > (*e2)->table_id)
del = e1;
}
else if ((*e1)->table_id < (*e2)->table_id){
if ((*e1)->table_id < (*e2)->table_id)
del = e2;
}
else // ((*e1)->table_id == (*e2)->table_id)
{
del = e1;
}
/* can not happen. This check is pure paranoia :) */
if (del == mySIeventsOrderServiceUniqueKeyFirstStartTimeEventUniqueKey.end())
continue;
xprintf("%s: -------- %llx.%02x '%s'\n", __func__,
(*del)->uniqueKey(), (*del)->table_id, (*del)->getName().empty() ? "NULL":(*del)->getName().c_str());
xprintf("%s: removing event %llx.%02x '%s'\n", __func__,
(*del)->uniqueKey(), (*del)->table_id, (*del)->getName().c_str());
unlockEvents();
deleteEvent((*del)->uniqueKey());
readLockEvents();
@@ -8291,12 +8293,14 @@ printf("[sectionsd] Removed %d old events.\n", anzEventsAlt - mySIeventsOrderUni
unlockEvents();
// usleep(100);
// lockEvents();
#ifdef USE_BROKEN_REMOVE_DUP_EVENTS
/* this is currently broken */
removeDupEvents();
readLockEvents();
printf("[sectionsd] Removed %d dup events.\n", anzEventsAlt - mySIeventsOrderUniqueKey.size());
anzEventsAlt = mySIeventsOrderUniqueKey.size();
unlockEvents();
#endif
dprintf("before removewasteepg\n");
#ifdef UPDATE_NETWORKS
removeWasteEvents(); // Events for channels not in services.xml