mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 17:31:11 +02:00
sectionsd: don't take any chances in deleteEvent()
Just take the write lock right away, to make sure nothing changes the
event lists behind our backs and possibly corrupts the iterator.
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1392 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Commit: df3d2fbc3b
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2011-04-11 (Mon, 11 Apr 2011)
This commit is contained in:
@@ -652,21 +652,17 @@ static void addBouquetFilter(t_bouquet_id bid)
|
||||
// Loescht ein Event aus allen Mengen
|
||||
static bool deleteEvent(const event_id_t uniqueKey)
|
||||
{
|
||||
readLockEvents();
|
||||
writeLockEvents();
|
||||
MySIeventsOrderUniqueKey::iterator e = mySIeventsOrderUniqueKey.find(uniqueKey);
|
||||
|
||||
if (e != mySIeventsOrderUniqueKey.end())
|
||||
{
|
||||
if (e->second->times.size())
|
||||
{
|
||||
unlockEvents();
|
||||
writeLockEvents();
|
||||
mySIeventsOrderFirstEndTimeServiceIDEventUniqueKey.erase(e->second);
|
||||
mySIeventsOrderServiceUniqueKeyFirstStartTimeEventUniqueKey.erase(e->second);
|
||||
}
|
||||
|
||||
unlockEvents();
|
||||
writeLockEvents();
|
||||
mySIeventsOrderUniqueKey.erase(uniqueKey);
|
||||
mySIeventsNVODorderUniqueKey.erase(uniqueKey);
|
||||
|
||||
|
Reference in New Issue
Block a user