nhttp: change mutex type to recursive

This commit is contained in:
[CST] Focus
2016-02-16 18:54:02 +03:00
parent 10c430d40e
commit ecb5e06128
4 changed files with 23 additions and 17 deletions

View File

@@ -902,9 +902,9 @@ std::string CControlAPI::_GetBouquetActualEPGItem(CyhookHandler *hh, CZapitChann
CSectionsdClient::responseGetCurrentNextInfoChannelID currentNextInfo;
CChannelEvent *event;
NeutrinoAPI->mutex.lock();
NeutrinoAPI->Lock();
event = NeutrinoAPI->ChannelListEvents[channel->getChannelID()];
NeutrinoAPI->mutex.unlock();
NeutrinoAPI->Unlock();
if (event) {
int percentage = 100;
@@ -968,9 +968,9 @@ std::string CControlAPI::_GetBouquetWriteItem(CyhookHandler *hh, CZapitChannel *
}
else {
CChannelEvent *event;
NeutrinoAPI->mutex.lock();
NeutrinoAPI->Lock();
event = NeutrinoAPI->ChannelListEvents[channel->getChannelID()];
NeutrinoAPI->mutex.unlock();
NeutrinoAPI->Unlock();
if (event && isEPGdetails) {
result += string_printf("%u "
@@ -1638,9 +1638,9 @@ void CControlAPI::EpgCGI(CyhookHandler *hh) {
CBouquetManager::ChannelIterator cit = mode == CZapitClient::MODE_RADIO ? g_bouquetManager->radioChannelsBegin() : g_bouquetManager->tvChannelsBegin();
for (; !(cit.EndOfChannels()); cit++) {
CZapitChannel * channel = *cit;
NeutrinoAPI->mutex.lock();
NeutrinoAPI->Lock();
event = NeutrinoAPI->ChannelListEvents[channel->getChannelID()];
NeutrinoAPI->mutex.unlock();
NeutrinoAPI->Unlock();
if (event) {
if (!isExt) {
hh->printf(PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS