]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blame - src/patches/vdr-plugin-epgsearch-gcc44.patch
Merge branch 'next' of ssh://git.ipfire.org/pub/git/ipfire-2.x into next
[people/teissler/ipfire-2.x.git] / src / patches / vdr-plugin-epgsearch-gcc44.patch
CommitLineData
07ee61b2
MT
1diff -urNad vdr-plugin-epgsearch-0.9.24~/epgsearchsvdrp.c vdr-plugin-epgsearch-0.9.24/epgsearchsvdrp.c
2--- vdr-plugin-epgsearch-0.9.24~/epgsearchsvdrp.c 2008-04-13 20:53:44.000000000 +0200
3+++ vdr-plugin-epgsearch-0.9.24/epgsearchsvdrp.c 2009-10-26 20:27:07.000000000 +0100
4@@ -742,12 +742,13 @@
5 {
6 if (*Option)
7 {
8- char* pipePos = strchr(Option, '|');
9+ const char* pipePos = strchr(Option, '|');
10 if (pipePos)
11 {
12- *pipePos = 0;
13- const char* oldName = Option;
14- const char* newName = pipePos+1;
15+ int index = pipePos - Option;
16+ char* oldName = strdup(Option);
17+ *(oldName + index) = 0;
18+ const char* newName = oldName + index + 1;
19 if (strlen(oldName) > 0 && strlen(newName) > 0)
20 {
21 cChannelGroup *changrp = ChannelGroups.GetGroupByName(Option);
22@@ -769,15 +770,18 @@
23 }
24 ChannelGroups.Save();
25 SearchExts.Save();
26+ free(oldName);
27 return cString::sprintf("renamed channel group '%s' to '%s'", oldName, newName);
28
29 }
30 else
31 {
32+ free(oldName);
33 ReplyCode = 901;
34 return cString::sprintf("channel group '%s' not defined", Option);
35 }
36 }
37+ free(oldName);
38 }
39 ReplyCode = 901;
40 return cString("Error in channel group parameters");
41diff -urNad vdr-plugin-epgsearch-0.9.24~/epgsearchtools.c vdr-plugin-epgsearch-0.9.24/epgsearchtools.c
42--- vdr-plugin-epgsearch-0.9.24~/epgsearchtools.c 2008-04-13 20:53:42.000000000 +0200
43+++ vdr-plugin-epgsearch-0.9.24/epgsearchtools.c 2009-10-26 20:27:07.000000000 +0100
44@@ -743,7 +743,7 @@
45 while(tmp)
46 {
47 // extract a single line
48- char* lf = strchr(tmp, '\n');
49+ const char* lf = strchr(tmp, '\n');
50 char* line = NULL;
51 if (lf)
52 line = strndup(tmp, lf-tmp);
53diff -urNad vdr-plugin-epgsearch-0.9.24~/menu_dirselect.c vdr-plugin-epgsearch-0.9.24/menu_dirselect.c
54--- vdr-plugin-epgsearch-0.9.24~/menu_dirselect.c 2008-04-13 20:53:44.000000000 +0200
55+++ vdr-plugin-epgsearch-0.9.24/menu_dirselect.c 2009-10-26 20:27:07.000000000 +0100
56@@ -83,7 +83,7 @@
57 return 1;
58 do
59 {
60- char* pos = strchr(szDir, '~');
61+ const char* pos = strchr(szDir, '~');
62 if (pos)
63 {
64 iLevel++;
65diff -urNad vdr-plugin-epgsearch-0.9.24~/searchtimer_thread.c vdr-plugin-epgsearch-0.9.24/searchtimer_thread.c
66--- vdr-plugin-epgsearch-0.9.24~/searchtimer_thread.c 2008-04-28 18:22:31.000000000 +0200
67+++ vdr-plugin-epgsearch-0.9.24/searchtimer_thread.c 2009-10-26 20:27:28.000000000 +0100
68@@ -565,8 +565,8 @@
69 if (!isempty(aux))
70 {
71 tmpaux = strdup(aux);
72- char* begin = strstr(aux, "<epgsearch>");
73- char* end = strstr(aux, "</epgsearch>");
74+ const char* begin = strstr(aux, "<epgsearch>");
75+ const char* end = strstr(aux, "</epgsearch>");
76 if (begin && end)
77 {
78 if (begin == aux) strcpy(tmpaux, ""); else strn0cpy(tmpaux, aux, begin-aux+1);