From f8c92331072037bbf0f8ccd1a948c5cf6cca96ea Mon Sep 17 00:00:00 2001 From: gixxpunk Date: Mon, 11 Apr 2011 15:01:24 +0000 Subject: [PATCH] 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: https://github.com/neutrino-images/ni-neutrino/commit/6395258913dac4a35429fd3c3913ac03457f2520 Author: gixxpunk 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 --- src/sectionsd/sectionsd.cpp | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/src/sectionsd/sectionsd.cpp b/src/sectionsd/sectionsd.cpp index 8d4ef9b64..851e9c595 100644 --- a/src/sectionsd/sectionsd.cpp +++ b/src/sectionsd/sectionsd.cpp @@ -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