- controlapi: fix compiler warning

error: declaration of 'channel_id' shadows a previous local
This commit is contained in:
svenhoefer
2016-11-09 17:13:43 +01:00
parent 3150d9edac
commit 703caef3f6

View File

@@ -1820,9 +1820,9 @@ void CControlAPI::SendFoundEvents(CyhookHandler *hh, bool xml_format)
if( (eventIterator->startTime+eventIterator->duration) < u_azeit)
continue;
t_channel_id channel_id = eventIterator->channelID;
t_channel_id epg_id = channel_id;
CZapitChannel * ch = CServiceManager::getInstance()->FindChannel(channel_id);
t_channel_id chan_id = eventIterator->channelID;
t_channel_id epg_id = chan_id;
CZapitChannel * ch = CServiceManager::getInstance()->FindChannel(chan_id);
if (ch)
epg_id = ch->getEpgID();
@@ -1830,7 +1830,7 @@ void CControlAPI::SendFoundEvents(CyhookHandler *hh, bool xml_format)
item.clear();
if (hh->outType == json || hh->outType == xml)
{
item += hh->outPair("channelname", NeutrinoAPI->GetServiceName(channel_id), true);
item += hh->outPair("channelname", NeutrinoAPI->GetServiceName(chan_id), true);
item += hh->outPair("epgtitle", hh->outValue(epg.title), true);
if (return_epginfo) {
item += hh->outPair("info1", hh->outValue(epg.info1), true);
@@ -1854,7 +1854,7 @@ void CControlAPI::SendFoundEvents(CyhookHandler *hh, bool xml_format)
strftime(tmpstr, sizeof(tmpstr), "%H:%M", tmStartZeit );
item += hh->outPair("time", tmpstr, true);
item += hh->outPair("duration", string_printf("%d", eventIterator->duration / 60), true);
item += hh->outPair("channel_id", string_printf(PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS, channel_id), true);
item += hh->outPair("channel_id", string_printf(PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS, chan_id), true);
item += hh->outPair("epg_id", string_printf(PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS, epg_id), true);
item += hh->outPair("eventid", string_printf("%llu", eventIterator->eventID), false);
@@ -1873,7 +1873,7 @@ void CControlAPI::SendFoundEvents(CyhookHandler *hh, bool xml_format)
datetimer_str += tmpstr;
result += hh->outSingle(datetimer_str);
result += hh->outSingle(NeutrinoAPI->GetServiceName(channel_id));
result += hh->outSingle(NeutrinoAPI->GetServiceName(chan_id));
result += hh->outSingle(epg.title);
if (return_epginfo) {
if(!epg.info1.empty())