mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 08:21:07 +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
------------------
Commit: cdb0e0ef21
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2013-08-12 (Mon, 12 Aug 2013)
This commit is contained in:
@@ -129,10 +129,11 @@ void CEpgScan::Next()
|
||||
|
||||
t_channel_id live_channel_id = CZapit::getInstance()->GetCurrentChannelID();
|
||||
|
||||
CFrontend *live_fe = CZapit::getInstance()->GetLiveFrontend();
|
||||
/* executed in neutrino thread - possible race with locks in zapit zap NOWAIT :
|
||||
send zaTo_NOWAIT -> EIT_COMPLETE from sectionsd -> zap and this at the same time
|
||||
send zapTo_NOWAIT -> EIT_COMPLETE from sectionsd -> zap and this at the same time
|
||||
*/
|
||||
CFEManager::getInstance()->Lock();
|
||||
CFrontend *live_fe = CZapit::getInstance()->GetLiveFrontend();
|
||||
CFEManager::getInstance()->lockFrontend(live_fe);
|
||||
#ifdef ENABLE_PIP
|
||||
CFrontend *pip_fe = CZapit::getInstance()->GetPipFrontend();
|
||||
@@ -158,6 +159,7 @@ void CEpgScan::Next()
|
||||
if (pip_fe && pip_fe != live_fe)
|
||||
CFEManager::getInstance()->unlockFrontend(pip_fe);
|
||||
#endif
|
||||
CFEManager::getInstance()->Unlock();
|
||||
if (next_chid)
|
||||
g_Zapit->zapTo_epg(next_chid);
|
||||
}
|
||||
|
Reference in New Issue
Block a user