mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
src/timerd/timermanager.cpp dont unlock on other errors
Origin commit data
------------------
Branch: ni/coolstream
Commit: 950963146a
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2017-01-03 (Tue, 03 Jan 2017)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -723,7 +723,6 @@ bool CTimerManager::shutdown()
|
|||||||
time_t nextAnnounceTime=0;
|
time_t nextAnnounceTime=0;
|
||||||
bool status=false;
|
bool status=false;
|
||||||
timer_is_rec = false;
|
timer_is_rec = false;
|
||||||
|
|
||||||
dprintf("stopping timermanager thread ...\n");
|
dprintf("stopping timermanager thread ...\n");
|
||||||
|
|
||||||
dprintf("Waiting for timermanager thread to terminate ...\n");
|
dprintf("Waiting for timermanager thread to terminate ...\n");
|
||||||
@@ -737,7 +736,8 @@ bool CTimerManager::shutdown()
|
|||||||
saveEventsToConfig();
|
saveEventsToConfig();
|
||||||
dprintf("shutdown: saved config\n");
|
dprintf("shutdown: saved config\n");
|
||||||
}
|
}
|
||||||
if (pthread_mutex_trylock(&tm_eventsMutex) == EBUSY)
|
int rc = pthread_mutex_trylock(&tm_eventsMutex);
|
||||||
|
if (rc == EBUSY)
|
||||||
{
|
{
|
||||||
dprintf("error: mutex is still LOCKED\n");
|
dprintf("error: mutex is still LOCKED\n");
|
||||||
return false;
|
return false;
|
||||||
@@ -771,8 +771,8 @@ bool CTimerManager::shutdown()
|
|||||||
timer_minutes = (nextAnnounceTime - 3*60)/60;
|
timer_minutes = (nextAnnounceTime - 3*60)/60;
|
||||||
}
|
}
|
||||||
dprintf("shutdown: timeset: %d timer_minutes %ld\n", timeset, timer_minutes);
|
dprintf("shutdown: timeset: %d timer_minutes %ld\n", timeset, timer_minutes);
|
||||||
|
if(rc == 0)
|
||||||
pthread_mutex_unlock(&tm_eventsMutex);
|
pthread_mutex_unlock(&tm_eventsMutex);
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
//------------------------------------------------------------
|
//------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user