summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTORS2
-rw-r--r--HISTORY3
-rw-r--r--device.c23
3 files changed, 18 insertions, 10 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 1cf1e4b5..8e410efc 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -148,6 +148,8 @@ Stefan Huelswitt <huels@iname.com>
for reporting a bug when entering an integer value outside the limit
for adding play mode pmAudioOnlyBlack
for helping to fix starting a recording of the current channel with only one DVB card
+ for making cStatus::MsgChannelSwitch() only be called if a channel is actually going to
+ be switched or has actually been switched successfully
Ulrich Röder <roeder@efr-net.de>
for pointing out that there are channels that have a symbol rate higher than
diff --git a/HISTORY b/HISTORY
index 571cee90..bc54e6fa 100644
--- a/HISTORY
+++ b/HISTORY
@@ -1468,3 +1468,6 @@ Video Disk Recorder Revision History
(thanks to Stefan Huelswitt for his help).
- A previous 'Transfer Mode' is now automatically re-started after a replay
stops.
+- Only calling cStatus::MsgChannelSwitch() if a channel is actually going to
+ be switched or has actually been switched successfully (thanks to Stefan
+ Huelswitt).
diff --git a/device.c b/device.c
index 58e07ce7..830c3ef3 100644
--- a/device.c
+++ b/device.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: device.c 1.20 2002/09/15 11:05:41 kls Exp $
+ * $Id: device.c 1.21 2002/09/15 11:50:19 kls Exp $
*/
#include "device.h"
@@ -326,8 +326,6 @@ bool cDevice::SwitchChannel(int Direction)
eSetChannelResult cDevice::SetChannel(const cChannel *Channel, bool LiveView)
{
- cStatus::MsgChannelSwitch(this, 0);
-
if (LiveView)
StopReplay();
@@ -344,6 +342,7 @@ eSetChannelResult cDevice::SetChannel(const cChannel *Channel, bool LiveView)
if (NeedsTransferMode) {
cDevice *CaDevice = GetDevice(Channel, 0);
if (CaDevice) {
+ cStatus::MsgChannelSwitch(this, 0); // only report status if we are actually going to switch the channel
if (CaDevice->SetChannel(Channel, false) == scrOk) // calling SetChannel() directly, not SwitchChannel()!
cControl::Launch(new cTransferControl(CaDevice, Channel->vpid, Channel->apid1, 0, 0, 0));//XXX+
else
@@ -352,15 +351,19 @@ eSetChannelResult cDevice::SetChannel(const cChannel *Channel, bool LiveView)
else
Result = scrNotAvailable;
}
- else if (!SetChannelDevice(Channel, LiveView))
- Result = scrFailed;
-
- if (Result == scrOk && LiveView && IsPrimaryDevice()) {
- cSIProcessor::SetCurrentServiceID(Channel->pnr);
- currentChannel = Channel->number;
+ else {
+ cStatus::MsgChannelSwitch(this, 0); // only report status if we are actually going to switch the channel
+ if (!SetChannelDevice(Channel, LiveView))
+ Result = scrFailed;
}
- cStatus::MsgChannelSwitch(this, Channel->number);
+ if (Result == scrOk) {
+ if (LiveView && IsPrimaryDevice()) {
+ cSIProcessor::SetCurrentServiceID(Channel->pnr);
+ currentChannel = Channel->number;
+ }
+ cStatus::MsgChannelSwitch(this, Channel->number); // only report status if channel switch successfull
+ }
return Result;
}