mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed handling ':' characters in channel names when reading channels.conf
This commit is contained in:
parent
19efbe4503
commit
a4c7d7b8a7
@ -768,6 +768,8 @@ Ernst F
|
|||||||
Reinhard Nissl <rnissl@gmx.de>
|
Reinhard Nissl <rnissl@gmx.de>
|
||||||
for reporting a name clash because of function crc32() in libdtv/libsi/si_parser.c
|
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
|
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>
|
Richard Robson <richard_robson@beeb.net>
|
||||||
for reporting freezing replay if a timer starts while in Transfer Mode from the
|
for reporting freezing replay if a timer starts while in Transfer Mode from the
|
||||||
|
2
HISTORY
2
HISTORY
@ -2381,3 +2381,5 @@ Video Disk Recorder Revision History
|
|||||||
- Fixed dropping out of replay mode while viewing a recording that is still
|
- 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
|
going on (thanks to Oliver Endriss for reporting and helping to debug this
|
||||||
one).
|
one).
|
||||||
|
- Fixed handling ':' characters in channel names when reading channels.conf
|
||||||
|
(thanks to Reinhard Nissl for reporting this one).
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* 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"
|
#include "channels.h"
|
||||||
@ -315,6 +315,7 @@ const char *cChannel::ToText(void)
|
|||||||
|
|
||||||
bool cChannel::Parse(const char *s, bool AllowNonUniqueID)
|
bool cChannel::Parse(const char *s, bool AllowNonUniqueID)
|
||||||
{
|
{
|
||||||
|
bool ok = true;
|
||||||
if (*s == ':') {
|
if (*s == ':') {
|
||||||
groupSep = true;
|
groupSep = true;
|
||||||
if (*++s == '@' && *++s) {
|
if (*++s == '@' && *++s) {
|
||||||
@ -346,7 +347,7 @@ bool cChannel::Parse(const char *s, bool AllowNonUniqueID)
|
|||||||
vpid = ppid = 0;
|
vpid = ppid = 0;
|
||||||
apid1 = apid2 = 0;
|
apid1 = apid2 = 0;
|
||||||
dpid1 = dpid2 = 0;
|
dpid1 = dpid2 = 0;
|
||||||
bool ok = false;
|
ok = false;
|
||||||
if (parambuf && sourcebuf && vpidbuf && apidbuf) {
|
if (parambuf && sourcebuf && vpidbuf && apidbuf) {
|
||||||
ok = StringToParameters(parambuf) && (source = cSource::FromString(sourcebuf)) >= 0;
|
ok = StringToParameters(parambuf) && (source = cSource::FromString(sourcebuf)) >= 0;
|
||||||
char *p = strchr(vpidbuf, '+');
|
char *p = strchr(vpidbuf, '+');
|
||||||
@ -372,13 +373,12 @@ bool cChannel::Parse(const char *s, bool AllowNonUniqueID)
|
|||||||
esyslog("ERROR: channel data not unique!");
|
esyslog("ERROR: channel data not unique!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return ok;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
strreplace(name, '|', ':');
|
strreplace(name, '|', ':');
|
||||||
return true;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool cChannel::Save(FILE *f)
|
bool cChannel::Save(FILE *f)
|
||||||
|
Loading…
Reference in New Issue
Block a user