diff options
author | Dieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de> | 2010-10-17 15:55:18 +0200 |
---|---|---|
committer | Dieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de> | 2010-10-17 15:55:18 +0200 |
commit | 0ce41c5a6c128c980be72985b6faf9e1f53ff5b9 (patch) | |
tree | 990fb09909fb4257b69f2c446a28c84261ab7442 | |
parent | 8edd4eb02751bbf45ab2833102dee3707fbbd499 (diff) | |
download | vdr-plugin-live-0ce41c5a6c128c980be72985b6faf9e1f53ff5b9.tar.gz vdr-plugin-live-0ce41c5a6c128c980be72985b6faf9e1f53ff5b9.tar.bz2 |
Protect the ':' in title or aux string.
Use StringReplace here because if ':' are characters in the
title or aux string it breaks parsing of timer definition
in VDRs cTimer::Parse method. The '|' will be replaced
back to ':' by the cTimer::Parse() method.
Fix was submitted by rofafor: see
http://www.vdr-portal.de/board/thread.php?threadid=100398
-rw-r--r-- | timers.cpp | 23 |
1 files changed, 19 insertions, 4 deletions
@@ -136,10 +136,25 @@ namespace vdrlive { cMutexLock lock( this ); ostringstream builder; - builder << flags << ":" << channel << ":" << ( weekdays != "-------" ? weekdays : "" ) - << ( weekdays == "-------" || day.empty() ? "" : "@" ) << day << ":" << start << ":" << stop << ":" - << priority << ":" << lifetime << ":" << title << ":" << aux; - // dsyslog("%s", builder.str().c_str()); + builder << flags << ":" + << channel << ":" + << ( weekdays != "-------" ? weekdays : "" ) + << ( weekdays == "-------" || day.empty() ? "" : "@" ) << day << ":" + << start << ":" + << stop << ":" + << priority << ":" + << lifetime << ":" + << StringReplace(title, ":", "|" ) << ":" + << StringReplace(aux, ":", "|" ); + // Use StringReplace here because if ':' are characters in the + // title or aux string it breaks parsing of timer definition + // in VDRs cTimer::Parse method. The '|' will be replaced + // back to ':' by the cTimer::Parse() method. + + // Fix was submitted by rofafor: see + // http://www.vdr-portal.de/board/thread.php?threadid=100398 + + // dsyslog("%s", builder.str().c_str()); TimerPair timerData( timer, builder.str() ); |