summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de>2010-10-17 15:55:18 +0200
committerDieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de>2010-10-17 15:55:18 +0200
commit0ce41c5a6c128c980be72985b6faf9e1f53ff5b9 (patch)
tree990fb09909fb4257b69f2c446a28c84261ab7442
parent8edd4eb02751bbf45ab2833102dee3707fbbd499 (diff)
downloadvdr-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.cpp23
1 files changed, 19 insertions, 4 deletions
diff --git a/timers.cpp b/timers.cpp
index 5dd3f6c..9c741ad 100644
--- a/timers.cpp
+++ b/timers.cpp
@@ -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() );