1 Source: http://download.opensuse.org/repositories/vdr/openSUSE_11.1/src/vdr-1.6.0-62.1.src.rpm
2 Index: vdr-1.6.0/recording.c
3 ===================================================================
4 --- vdr-1.6.0.orig/recording.c
5 +++ vdr-1.6.0/recording.c
6 @@ -509,8 +509,8 @@ cRecording::cRecording(cTimer *Timer, co
7 Utf8Strn0Cpy(SubtitleBuffer, Subtitle, MAX_SUBTITLE_LENGTH);
8 Subtitle = SubtitleBuffer;
10 - char *macroTITLE = strstr(Timer->File(), TIMERMACRO_TITLE);
11 - char *macroEPISODE = strstr(Timer->File(), TIMERMACRO_EPISODE);
12 + const char *macroTITLE = strstr(Timer->File(), TIMERMACRO_TITLE);
13 + const char *macroEPISODE = strstr(Timer->File(), TIMERMACRO_EPISODE);
14 if (macroTITLE || macroEPISODE) {
15 name = strdup(Timer->File());
16 name = strreplace(name, TIMERMACRO_TITLE, Title);
17 @@ -551,7 +551,7 @@ cRecording::cRecording(const char *FileN
19 fileName = strdup(FileName);
20 FileName += strlen(VideoDirectory) + 1;
21 - char *p = strrchr(FileName, '/');
22 + const char *p = strrchr(FileName, '/');
25 info = new cRecordingInfo;
26 @@ -1022,7 +1022,8 @@ void cRecordings::DelByName(const char *
28 cThreadLock DeletedRecordingsLock(&DeletedRecordings);
29 Del(recording, false);
30 - char *ext = strrchr(recording->FileName(), '.');
32 + char *ext = strrchr(const_cast<char*>(recording->FileName()), '.');
34 strncpy(ext, DELEXT, strlen(ext));
35 recording->fileSizeMB = DirSizeMB(recording->FileName());
36 Index: vdr-1.6.0/svdrp.c
37 ===================================================================
38 --- vdr-1.6.0.orig/svdrp.c
40 @@ -736,7 +736,7 @@ void cSVDRP::CmdGRAB(const char *Option)
42 FileName = strtok_r(p, delim, &strtok_next);
44 - char *Extension = strrchr(FileName, '.');
45 + const char *Extension = strrchr(FileName, '.');
47 if (strcasecmp(Extension, ".jpg") == 0 || strcasecmp(Extension, ".jpeg") == 0)
49 @@ -795,16 +795,17 @@ void cSVDRP::CmdGRAB(const char *Option)
50 char RealFileName[PATH_MAX];
54 - char *slash = strrchr(FileName, '/');
55 + cString s(FileName);
57 + const char *slash = strrchr(FileName, '/');
59 s = AddDirectory(grabImageDir, FileName);
62 slash = strrchr(FileName, '/'); // there definitely is one
64 - char *r = realpath(FileName, RealFileName);
67 + t.Truncate(slash - FileName);
68 + char *r = realpath(t, RealFileName);
70 LOG_ERROR_STR(FileName);
71 Reply(501, "Invalid file name \"%s\"", FileName);