mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 17:31:11 +02:00
sectionsd: delete events with vector list
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@2081 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Branch: ni/coolstream
Commit: e65cd22ebe
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2012-02-01 (Wed, 01 Feb 2012)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -1259,6 +1259,7 @@ xmlNodePtr FindTransponder(xmlNodePtr provider, const t_original_network_id onid
|
||||
static void removeOldEvents(const long seconds)
|
||||
{
|
||||
bool goodtimefound;
|
||||
std::vector<event_id_t> to_delete;
|
||||
|
||||
// Alte events loeschen
|
||||
time_t zeit = time(NULL);
|
||||
@@ -1268,7 +1269,6 @@ static void removeOldEvents(const long seconds)
|
||||
MySIeventsOrderFirstEndTimeServiceIDEventUniqueKey::iterator e = mySIeventsOrderFirstEndTimeServiceIDEventUniqueKey.begin();
|
||||
|
||||
while ((e != mySIeventsOrderFirstEndTimeServiceIDEventUniqueKey.end()) && (!messaging_zap_detected)) {
|
||||
unlockEvents();
|
||||
goodtimefound = false;
|
||||
for (SItimes::iterator t = (*e)->times.begin(); t != (*e)->times.end(); t++) {
|
||||
if (t->startzeit + (long)t->dauer >= zeit - seconds) {
|
||||
@@ -1279,13 +1279,14 @@ static void removeOldEvents(const long seconds)
|
||||
}
|
||||
|
||||
if (false == goodtimefound)
|
||||
deleteEvent((*(e++))->uniqueKey());
|
||||
else
|
||||
++e;
|
||||
readLockEvents();
|
||||
to_delete.push_back((*e)->uniqueKey());
|
||||
e++;
|
||||
}
|
||||
unlockEvents();
|
||||
|
||||
for (std::vector<event_id_t>::iterator i = to_delete.begin(); i != to_delete.end(); i++)
|
||||
deleteEvent(*i);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1341,7 +1342,6 @@ static void removeDupEvents(void)
|
||||
/* clean up outside of the iterator loop */
|
||||
for (std::vector<event_id_t>::iterator i = to_delete.begin(); i != to_delete.end(); i++)
|
||||
deleteEvent(*i);
|
||||
to_delete.clear(); /* needed? can't hurt... */
|
||||
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user