controlapi: fix compiler warning

error: declaration of 'channel_id' shadows a previous local


Origin commit data
------------------
Branch: ni/coolstream
Commit: 703caef3f6
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-11-09 (Wed, 09 Nov 2016)

Origin message was:
------------------
- controlapi: fix compiler warning

error: declaration of 'channel_id' shadows a previous local


------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2016-11-09 17:13:43 +01:00
parent efad07c007
commit 7ee31ecf63

View File

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