eitd: -fix read/write epg collision

This commit is contained in:
satbaby
2012-05-08 13:55:47 +02:00
parent cfdf7b0c69
commit 520cf0e150
2 changed files with 12 additions and 15 deletions

View File

@@ -1180,12 +1180,12 @@ static void commandReadSIfromXML(int connfd, char *data, const unsigned dataLeng
static void commandWriteSI2XML(int connfd, char *data, const unsigned dataLength)
{
char epgdir[100] = "";
sendEmptyResponse(connfd, NULL, 0);
if (dataLength > 100)
return;
if ((!reader_ready) || (dataLength > 100)){
eventServer->sendEvent(CSectionsdClient::EVT_WRITE_SI_FINISHED, CEventServer::INITID_SECTIONSD);
return;
}
char epgdir[100] = "";
strncpy(epgdir, data, dataLength);
epgdir[dataLength] = '\0';