From 3b0ac92b2c28fd77a727a70525202eed16dfd5a3 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Fri, 3 Feb 2012 19:33:43 +0400 Subject: [PATCH] eitd: remove code under ifdef REMOVE_DUPS Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/045e0c9d13f038885f1c5c3187de11947d651482 Author: [CST] Focus Date: 2012-02-03 (Fri, 03 Feb 2012) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/eitd/sectionsd.cpp | 68 +----------------------------------------- 1 file changed, 1 insertion(+), 67 deletions(-) diff --git a/src/eitd/sectionsd.cpp b/src/eitd/sectionsd.cpp index 0c5ddb177..bd5741315 100644 --- a/src/eitd/sectionsd.cpp +++ b/src/eitd/sectionsd.cpp @@ -966,64 +966,6 @@ static void removeOldEvents(const long seconds) return; } -#ifdef REMOVE_DUPS -/* Remove duplicate events (same Service, same start and endtime) - * with different eventID. Use the one from the lower table_id. - * This routine could be extended to remove overlapping events also, - * but let's keep that for later - */ -static void removeDupEvents(void) -{ - MySIeventsOrderServiceUniqueKeyFirstStartTimeEventUniqueKey::iterator e1, e2, del; - /* list of event IDs to delete */ - std::vectorto_delete; - - readLockEvents(); - e1 = mySIeventsOrderServiceUniqueKeyFirstStartTimeEventUniqueKey.begin(); - - while ((e1 != mySIeventsOrderServiceUniqueKeyFirstStartTimeEventUniqueKey.end()) && !messaging_zap_detected) - { - e2 = e1; - e1++; - if (e1 == mySIeventsOrderServiceUniqueKeyFirstStartTimeEventUniqueKey.end()) - break; - - /* check for the same service */ - if ((*e1)->get_channel_id() != (*e2)->get_channel_id()) - continue; - /* check for same time */ - 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) - { - dprintf("%s: not removing events %llx %llx, t:%02x '%s'\n", __func__, - (*e1)->uniqueKey(), (*e2)->uniqueKey(), (*e1)->table_id, (*e1)->getName().c_str()); - continue; - } - - if ((*e1)->table_id > (*e2)->table_id) - del = e1; - if ((*e1)->table_id < (*e2)->table_id) - del = e2; - - dprintf("%s: removing event %llx.%02x '%s'\n", __func__, - (*del)->uniqueKey(), (*del)->table_id, (*del)->getName().c_str()); - /* remember the unique ID for later deletion */ - to_delete.push_back((*del)->uniqueKey()); - } - unlockEvents(); - - /* clean up outside of the iterator loop */ - for (std::vector::iterator i = to_delete.begin(); i != to_delete.end(); i++) - deleteEvent(*i); - to_delete.clear(); /* needed? can't hurt... */ - - return; -} -#endif - // SIservicePtr; typedef boost::shared_ptr SIservicePtr; @@ -4451,15 +4393,7 @@ static void *houseKeepingThread(void *) } anzEventsAlt = mySIeventsOrderUniqueKey.size(); unlockEvents(); - // usleep(100); - // lockEvents(); -#ifdef REMOVE_DUPS - removeDupEvents(); - readLockEvents(); - printf("[sectionsd] Removed %d dup events.\n", anzEventsAlt - mySIeventsOrderUniqueKey.size()); - anzEventsAlt = mySIeventsOrderUniqueKey.size(); - unlockEvents(); -#endif + readLockEvents(); if (mySIeventsOrderUniqueKey.size() != anzEventsAlt) {