mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 01:11:06 +02:00
add some threadsafety
Origin commit data
------------------
Commit: 53b767f2d4
Author: TangoCash <eric@loxat.de>
Date: 2018-09-20 (Thu, 20 Sep 2018)
This commit is contained in:
@@ -808,6 +808,15 @@ void CBouquetManager::clearAll(bool user)
|
||||
if (!user)
|
||||
Bouquets = tmplist;
|
||||
remainChannels = NULL;
|
||||
if(thrLogo != 0)
|
||||
{
|
||||
pthread_cancel(thrLogo);
|
||||
pthread_join(thrLogo, NULL);
|
||||
thrLogo = 0;
|
||||
}
|
||||
pthread_mutex_lock (&mutex);
|
||||
LogoList.clear();
|
||||
pthread_mutex_unlock (&mutex);
|
||||
}
|
||||
|
||||
void CBouquetManager::deletePosition(t_satellite_position satellitePosition)
|
||||
@@ -1042,7 +1051,9 @@ void CBouquetManager::loadWebchannels(int mode)
|
||||
if (!alogo.empty())
|
||||
{
|
||||
channel->setAlternateLogo(alogo);
|
||||
pthread_mutex_lock (&mutex);
|
||||
LogoList.push_back(channel);
|
||||
pthread_mutex_unlock (&mutex);
|
||||
}
|
||||
channel->flags = CZapitChannel::UPDATED;
|
||||
if (gbouquet)
|
||||
@@ -1135,6 +1146,7 @@ void CBouquetManager::loadLogos()
|
||||
void* CBouquetManager::LogoThread(void* _logolist)
|
||||
{
|
||||
set_threadname(__func__);
|
||||
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
|
||||
pthread_mutex_lock (&mutex);
|
||||
ZapitChannelList *LogoList = (ZapitChannelList *)_logolist;
|
||||
for (ZapitChannelList::iterator it = LogoList->begin(); it != LogoList->end(); ++it)
|
||||
|
Reference in New Issue
Block a user