timerd/timerd: don't let getSleeptimerID return an already terminated id

This commit is contained in:
martii
2013-12-22 14:12:55 +01:00
committed by Jacek Jendrzej
parent f7ccedf620
commit 787ab2e554

View File

@@ -63,8 +63,8 @@ bool timerd_parse_command(CBasicMessage::Header &rmsg, int connfd)
{
for (pos = events.begin(); pos != events.end(); ++pos)
{
printf("ID: %u type: %u\n",pos->second->eventID,pos->second->eventType);
if(pos->second->eventType == CTimerd::TIMER_SLEEPTIMER)
// printf("ID: %u type: %u\n",pos->second->eventID,pos->second->eventType);
if(pos->second->eventType == CTimerd::TIMER_SLEEPTIMER && pos->second->eventState != CTimerd::TIMERSTATE_TERMINATED)
{
rspGetSleeptimer.eventID = pos->second->eventID;
break;