summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2001-01-13 11:31:56 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2001-01-13 11:31:56 +0100
commita7404879aaf06c74f1ea6cc94710b2cc187a8002 (patch)
treee349566054f7ffffc0e7370807f0a2b2cbd3a228 /config.c
parent845c9315e65df0fb9ae398b1e3459ec99d063e6f (diff)
downloadvdr-a7404879aaf06c74f1ea6cc94710b2cc187a8002.tar.gz
vdr-a7404879aaf06c74f1ea6cc94710b2cc187a8002.tar.bz2
Fixed setting/modifying timers via SVDRP with empty summary fields
Diffstat (limited to 'config.c')
-rw-r--r--config.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/config.c b/config.c
index b5134ae4..7da5b1b4 100644
--- a/config.c
+++ b/config.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: config.c 1.35 2000/12/01 16:53:48 kls Exp $
+ * $Id: config.c 1.36 2001/01/13 11:30:08 kls Exp $
*/
#include "config.h"
@@ -435,9 +435,11 @@ bool cTimer::Parse(const char *s)
//XXX to hear about that!
char *s2 = NULL;
int l2 = strlen(s);
- if (s[l2 - 2] == ':') { // note that 's' has a trailing '\n'
- s2 = (char *)malloc(l2 + 2);
- strcat(strn0cpy(s2, s, l2), " \n");
+ while (l2 > 0 && isspace(s[l2 - 1]))
+ l2--;
+ if (s[l2 - 1] == ':') {
+ s2 = (char *)malloc(l2 + 3);
+ strcat(strn0cpy(s2, s, l2 + 1), " \n");
s = s2;
}
if (8 <= sscanf(s, "%d:%d:%a[^:]:%d:%d:%d:%d:%a[^:\n]:%a[^\n]", &active, &channel, &buffer1, &start, &stop, &priority, &lifetime, &buffer2, &summary)) {