From 57ea119d03fe1f6cd08e4024a3d24006de7e6029 Mon Sep 17 00:00:00 2001 From: Rolf Ahrenberg Date: Sun, 28 Feb 2016 15:32:28 +0200 Subject: [PATCH] Fix statistics output. --- device.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/device.c b/device.c index 4a59291..3289853 100644 --- a/device.c +++ b/device.c @@ -120,8 +120,10 @@ cString cSatipDevice::GetSatipStatus(void) info = cString::sprintf("%sCardIndex: %d HasLock: yes Strength: %d Quality: %d%s\n", *info, device->CardIndex(), device->SignalStrength(), device->SignalQuality(), live ? " Live: yes" : ""); else info = cString::sprintf("%sCardIndex: %d HasLock: no\n", *info, device->CardIndex()); - if (channel && channel->Number() > 0) - info = cString::sprintf("%sTransponder: %d Channel: %s\n", *info, (channel && channel->Number() > 0) ? channel->Transponder() : 0, (channel && channel->Number() > 0) ? channel->Name() : "---"); + if (channel && channel->Number() > 0 && device->Receiving()) + info = cString::sprintf("%sTransponder: %d Channel: %s\n", *info, channel->Transponder(), channel->Name()); + else + info = cString::sprintf("%sTransponder: %d\n", *info, channel->Transponder()); if (timers) info = cString::sprintf("%sRecording: %d timer%s\n", *info, timers, (timers > 1) ? "s" : ""); info = cString::sprintf("%s\n", *info);