mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 17:01:08 +02:00
driver/record.cpp, driver/scanepg.cpp, zapit/src/zapit.cpp: try to prevent race
while lock/allocate frontend in case of possible concurrent usage in neutrino and zapit threads
Origin commit data
------------------
Branch: ni/coolstream
Commit: cdb0e0ef21
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2013-08-12 (Mon, 12 Aug 2013)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -1621,6 +1621,8 @@ bool CRecordManager::CutBackNeutrino(const t_channel_id channel_id, CFrontend *
|
||||
if(live_channel_id != channel_id) {
|
||||
/* first try to get frontend for record with locked live */
|
||||
bool unlock = true;
|
||||
/* executed in neutrino thread - possible race with zap NOWAIT and epg scan zap */
|
||||
CFEManager::getInstance()->Lock();
|
||||
CFEManager::getInstance()->lockFrontend(live_fe);
|
||||
frontend = CFEManager::getInstance()->allocateFE(channel, true);
|
||||
if (frontend == NULL) {
|
||||
@@ -1629,6 +1631,8 @@ bool CRecordManager::CutBackNeutrino(const t_channel_id channel_id, CFrontend *
|
||||
CFEManager::getInstance()->unlockFrontend(live_fe);
|
||||
frontend = CFEManager::getInstance()->allocateFE(channel, true);
|
||||
}
|
||||
CFEManager::getInstance()->Unlock();
|
||||
|
||||
if (frontend == NULL)
|
||||
return false;
|
||||
|
||||
|
Reference in New Issue
Block a user