From 703caef3f6a1e97d82ecd043f06ee4fda78a5723 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Wed, 9 Nov 2016 17:13:43 +0100 Subject: [PATCH] - controlapi: fix compiler warning error: declaration of 'channel_id' shadows a previous local --- src/nhttpd/tuxboxapi/controlapi.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/nhttpd/tuxboxapi/controlapi.cpp b/src/nhttpd/tuxboxapi/controlapi.cpp index e20891282..a228f09b9 100644 --- a/src/nhttpd/tuxboxapi/controlapi.cpp +++ b/src/nhttpd/tuxboxapi/controlapi.cpp @@ -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())