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

Origin commit data
------------------
Branch: ni/coolstream
Commit: 787ab2e554
Author: martii <m4rtii@gmx.de>
Date: 2013-12-22 (Sun, 22 Dec 2013)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
martii
2013-12-22 14:12:55 +01:00
committed by Jacek Jendrzej
parent 81701097a8
commit f2a0d3ee21

View File

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