summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2008-04-12 13:52:57 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2008-04-12 13:52:57 +0200
commit0e5bc7773af3a654483b6525eb9ff494153c0cb8 (patch)
treea8c56d02df0dd84b6ba6bc58f0a1b5043c6436af
parente59c6ac433e50f76986331a3ff2e610e60ddf4b5 (diff)
downloadvdr-0e5bc7773af3a654483b6525eb9ff494153c0cb8.tar.gz
vdr-0e5bc7773af3a654483b6525eb9ff494153c0cb8.tar.bz2
Fixed displaying transponder data when it is modified
-rw-r--r--CONTRIBUTORS1
-rw-r--r--HISTORY1
-rw-r--r--channels.c21
-rw-r--r--channels.h3
4 files changed, 18 insertions, 8 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 6ce5d256..abaeeef9 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -1174,6 +1174,7 @@ Reinhard Nissl <rnissl@gmx.de>
for reporting an invalid access in the section handler when ending VDR
for pointing out that cDevice::Transferring() doesn't return the right value in the
early stage of channel switching
+ for fixing displaying transponder data when it is modified
Richard Robson <richard_robson@beeb.net>
for reporting freezing replay if a timer starts while in Transfer Mode from the
diff --git a/HISTORY b/HISTORY
index da0127e5..2a1091d6 100644
--- a/HISTORY
+++ b/HISTORY
@@ -5738,3 +5738,4 @@ Video Disk Recorder Revision History
Note that the channels.conf file now supports additional parameters, so you may
want to make sure you have a backup of this file in case you need to go back to
the previous version of VDR!
+- Fixed displaying transponder data when it is modified (thanks to Reinhard Nissl).
diff --git a/channels.c b/channels.c
index d7cad1d9..3c3e7438 100644
--- a/channels.c
+++ b/channels.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: channels.c 2.1 2008/04/12 11:02:40 kls Exp $
+ * $Id: channels.c 2.2 2008/04/12 13:49:12 kls Exp $
*/
#include "channels.h"
@@ -356,7 +356,7 @@ bool cChannel::SetSatTransponderData(int Source, int Frequency, char Polarizatio
Srate = srate;
if (source != Source || frequency != Frequency || polarization != Polarization || srate != Srate || coderateH != CoderateH || modulation != Modulation || system != System || rollOff != RollOff) {
- cString OldParameters = ParametersToString();
+ cString OldTransponderData = TransponderDataToString();
source = Source;
frequency = Frequency;
polarization = Polarization;
@@ -367,7 +367,7 @@ bool cChannel::SetSatTransponderData(int Source, int Frequency, char Polarizatio
rollOff = RollOff;
schedule = NULL;
if (Number()) {
- dsyslog("changing transponder data of channel %d from %d:%s:%s:%d to %d:%s:%s:%d", Number(), frequency, *OldParameters, *cSource::ToString(source), srate, Frequency, *ParametersToString(), *cSource::ToString(Source), Srate);
+ dsyslog("changing transponder data of channel %d from %s to %s", Number(), *OldTransponderData, *TransponderDataToString());
modification |= CHANNELMOD_TRANSP;
Channels.SetModified();
}
@@ -378,7 +378,7 @@ bool cChannel::SetSatTransponderData(int Source, int Frequency, char Polarizatio
bool cChannel::SetCableTransponderData(int Source, int Frequency, int Modulation, int Srate, int CoderateH)
{
if (source != Source || frequency != Frequency || modulation != Modulation || srate != Srate || coderateH != CoderateH) {
- cString OldParameters = ParametersToString();
+ cString OldTransponderData = TransponderDataToString();
source = Source;
frequency = Frequency;
modulation = Modulation;
@@ -386,7 +386,7 @@ bool cChannel::SetCableTransponderData(int Source, int Frequency, int Modulation
coderateH = CoderateH;
schedule = NULL;
if (Number()) {
- dsyslog("changing transponder data of channel %d from %d:%s:%s:%d to %d:%s:%s:%d", Number(), frequency, *OldParameters, *cSource::ToString(source), srate, Frequency, *ParametersToString(), *cSource::ToString(Source), Srate);
+ dsyslog("changing transponder data of channel %d from %s to %s", Number(), *OldTransponderData, *TransponderDataToString());
modification |= CHANNELMOD_TRANSP;
Channels.SetModified();
}
@@ -397,7 +397,7 @@ bool cChannel::SetCableTransponderData(int Source, int Frequency, int Modulation
bool cChannel::SetTerrTransponderData(int Source, int Frequency, int Bandwidth, int Modulation, int Hierarchy, int CoderateH, int CoderateL, int Guard, int Transmission, int Alpha, int Priority)
{
if (source != Source || frequency != Frequency || bandwidth != Bandwidth || modulation != Modulation || hierarchy != Hierarchy || coderateH != CoderateH || coderateL != CoderateL || guard != Guard || transmission != Transmission || alpha != Alpha || priority != Priority) {
- cString OldParameters = ParametersToString();
+ cString OldTransponderData = TransponderDataToString();
source = Source;
frequency = Frequency;
bandwidth = Bandwidth;
@@ -411,7 +411,7 @@ bool cChannel::SetTerrTransponderData(int Source, int Frequency, int Bandwidth,
priority = Priority;
schedule = NULL;
if (Number()) {
- dsyslog("changing transponder data of channel %d from %d:%s:%s to %d:%s:%s", Number(), frequency, *OldParameters, *cSource::ToString(source), Frequency, *ParametersToString(), *cSource::ToString(Source));
+ dsyslog("changing transponder data of channel %d from %s to %s", Number(), *OldTransponderData, *TransponderDataToString());
modification |= CHANNELMOD_TRANSP;
Channels.SetModified();
}
@@ -652,6 +652,13 @@ static int PrintParameter(char *p, char Name, int Value)
return Value >= 0 && Value != 999 ? sprintf(p, "%c%d", Name, Value) : 0;
}
+cString cChannel::TransponderDataToString(void) const
+{
+ if (cSource::IsTerr(source))
+ return cString::sprintf("%d:%s:%s", frequency, *ParametersToString(), *cSource::ToString(source));
+ return cString::sprintf("%d:%s:%s:%d", frequency, *ParametersToString(), *cSource::ToString(source), srate);
+}
+
cString cChannel::ParametersToString(void) const
{
char type = **cSource::ToString(source);
diff --git a/channels.h b/channels.h
index 68b4ed4d..4d26ec24 100644
--- a/channels.h
+++ b/channels.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: channels.h 2.1 2008/04/12 10:49:51 kls Exp $
+ * $Id: channels.h 2.2 2008/04/12 13:46:50 kls Exp $
*/
#ifndef __CHANNELS_H
@@ -156,6 +156,7 @@ private:
mutable const cSchedule *schedule;
cLinkChannels *linkChannels;
cChannel *refChannel;
+ cString TransponderDataToString(void) const;
cString ParametersToString(void) const;
bool StringToParameters(const char *s);
public: