summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2003-09-09 18:55:26 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2003-09-09 18:55:26 +0200
commita4c7d7b8a74cd8ab7296113e47d341fa1addbf69 (patch)
tree54874bae370f6c2ce780a7e8a16adc8f0b5b8fe7
parent19efbe45031cc5015e92d5dbffb018cf0cbcbd8d (diff)
downloadvdr-a4c7d7b8a74cd8ab7296113e47d341fa1addbf69.tar.gz
vdr-a4c7d7b8a74cd8ab7296113e47d341fa1addbf69.tar.bz2
Fixed handling ':' characters in channel names when reading channels.conf
-rw-r--r--CONTRIBUTORS2
-rw-r--r--HISTORY2
-rw-r--r--channels.c8
3 files changed, 8 insertions, 4 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index c4051b37..f99de8f7 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -768,6 +768,8 @@ Ernst Fürst <ernstfuerst@swissonline.ch>
Reinhard Nissl <rnissl@gmx.de>
for reporting a name clash because of function crc32() in libdtv/libsi/si_parser.c
when using other libraries that also implement a function by that name
+ for reporting a bug in handling ':' characters in channel names when reading
+ channels.conf
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 37473fda..22c6c524 100644
--- a/HISTORY
+++ b/HISTORY
@@ -2381,3 +2381,5 @@ Video Disk Recorder Revision History
- Fixed dropping out of replay mode while viewing a recording that is still
going on (thanks to Oliver Endriss for reporting and helping to debug this
one).
+- Fixed handling ':' characters in channel names when reading channels.conf
+ (thanks to Reinhard Nissl for reporting this one).
diff --git a/channels.c b/channels.c
index 58577296..6ff71888 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 1.13 2003/08/16 09:12:26 kls Exp $
+ * $Id: channels.c 1.14 2003/09/09 18:55:26 kls Exp $
*/
#include "channels.h"
@@ -315,6 +315,7 @@ const char *cChannel::ToText(void)
bool cChannel::Parse(const char *s, bool AllowNonUniqueID)
{
+ bool ok = true;
if (*s == ':') {
groupSep = true;
if (*++s == '@' && *++s) {
@@ -346,7 +347,7 @@ bool cChannel::Parse(const char *s, bool AllowNonUniqueID)
vpid = ppid = 0;
apid1 = apid2 = 0;
dpid1 = dpid2 = 0;
- bool ok = false;
+ ok = false;
if (parambuf && sourcebuf && vpidbuf && apidbuf) {
ok = StringToParameters(parambuf) && (source = cSource::FromString(sourcebuf)) >= 0;
char *p = strchr(vpidbuf, '+');
@@ -372,13 +373,12 @@ bool cChannel::Parse(const char *s, bool AllowNonUniqueID)
esyslog("ERROR: channel data not unique!");
return false;
}
- return ok;
}
else
return false;
}
strreplace(name, '|', ':');
- return true;
+ return ok;
}
bool cChannel::Save(FILE *f)