Allow killTimer to check and reset timer id

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1562 e54a6e83-5905-42d5-8d5c-058d10e6a962


Origin commit data
------------------
Branch: ni/coolstream
Commit: 5c8429673a
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2011-07-21 (Thu, 21 Jul 2011)



------------------
This commit was generated by Migit
This commit is contained in:
[CST] Focus
2011-07-21 10:04:05 +00:00
parent 0076e718cd
commit 10c65d19e5
10 changed files with 8 additions and 36 deletions

View File

@@ -380,9 +380,12 @@ int CRCInput::addTimer(const time_t *Timeout)
return addTimer( (uint64_t)*Timeout* (uint64_t) 1000000, true, false );
}
void CRCInput::killTimer(uint32_t id)
void CRCInput::killTimer(uint32_t &id)
{
//printf("killing timer %d\n", id);
if(id == 0)
return;
std::vector<timer>::iterator e;
for ( e= timers.begin(); e!= timers.end(); ++e )
if ( e->id == id )
@@ -390,6 +393,7 @@ void CRCInput::killTimer(uint32_t id)
timers.erase(e);
break;
}
id = 0;
}
int CRCInput::checkTimers()
@@ -1017,7 +1021,7 @@ printf("[neutrino] CSectionsdClient::EVT_GOT_CN_EPG\n");
break;
case CZapitClient::EVT_PMT_CHANGED:
*msg = NeutrinoMessages::EVT_PMT_CHANGED;
*data = 0;
*data = (neutrino_msg_data_t) p;
break;
default:
printf("[neutrino] event INITID_ZAPIT - unknown eventID 0x%x\n", emsg.eventID );