summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY2
-rw-r--r--HISTORY.DE3
-rw-r--r--epgsearchsvdrp.c81
-rw-r--r--epgsearchtools.c2
-rw-r--r--menu_dirselect.c2
-rw-r--r--searchtimer_thread.c4
6 files changed, 52 insertions, 42 deletions
diff --git a/HISTORY b/HISTORY
index 48ba611..95e3819 100644
--- a/HISTORY
+++ b/HISTORY
@@ -70,6 +70,8 @@ fixes:
- fixed a bug in search timer announcements concerning the display of the corresponding
search timer
- fixed some memory leaks, thanks to Bittor Corl for providing a patch
+- some fixes to compile with gcc-4.4, thanks to firefly@vdrportal for providing a patch
+
2008-04-29: Version 0.9.24
new:
diff --git a/HISTORY.DE b/HISTORY.DE
index 15b4abf..b29d7b1 100644
--- a/HISTORY.DE
+++ b/HISTORY.DE
@@ -74,6 +74,9 @@ fixes:
- Fehler bei "Nur ankündigen"-Suchtimer im Zusammenhang mit der Anzeige des zugehörigen Such-
timernamens korrigiert.
- Einige Speicherlecks korrigiert, Danke an Bittor Corl für einen Patch
+- Einige Korrekturen damit es mit gcc-4.4 compiliert, Danke an firefly@vdrportal für einen
+ Patch.
+
2008-04-29: Version 0.9.24
neu:
diff --git a/epgsearchsvdrp.c b/epgsearchsvdrp.c
index 9420b46..a06c3fa 100644
--- a/epgsearchsvdrp.c
+++ b/epgsearchsvdrp.c
@@ -761,45 +761,50 @@ cString cPluginEpgsearch::SVDRPCommand(const char *Command, const char *Option,
}
else if (strcasecmp(Command, "RENC") == 0)
{
- if (*Option)
- {
- char* pipePos = strchr(Option, '|');
+ if (*Option)
+ {
+ const char* pipePos = strchr(Option, '|');
if (pipePos)
- {
- *pipePos = 0;
- const char* oldName = Option;
- const char* newName = pipePos+1;
- if (strlen(oldName) > 0 && strlen(newName) > 0)
- {
- cChannelGroup *changrp = ChannelGroups.GetGroupByName(Option);
- if (changrp)
- {
- strcpy(changrp->name, newName);
- cMutexLock SearchExtsLock(&SearchExts);
- cSearchExt *SearchExt = SearchExts.First();
- while (SearchExt)
- {
- if (SearchExt->useChannel == 2 &&
- SearchExt->channelGroup &&
- strcmp(SearchExt->channelGroup, oldName) == 0)
- {
- free(SearchExt->channelGroup);
- SearchExt->channelGroup = strdup(newName);
- }
- SearchExt = SearchExts.Next(SearchExt);
- }
- ChannelGroups.Save();
- SearchExts.Save();
- return cString::sprintf("renamed channel group '%s' to '%s'", oldName, newName);
-
- }
- else
- {
- ReplyCode = 901;
- return cString::sprintf("channel group '%s' not defined", Option);
- }
- }
- }
+ {
+ int index = pipePos - Option;
+ char* oldName = strdup(Option);
+ *(oldName + index) = 0;
+ const char* newName = oldName + index + 1;
+ if (strlen(oldName) > 0 && strlen(newName) > 0)
+ {
+ cChannelGroup *changrp = ChannelGroups.GetGroupByName(oldName);
+ if (changrp)
+ {
+ strcpy(changrp->name, newName);
+ cMutexLock SearchExtsLock(&SearchExts);
+ cSearchExt *SearchExt = SearchExts.First();
+ while (SearchExt)
+ {
+ if (SearchExt->useChannel == 2 &&
+ SearchExt->channelGroup &&
+ strcmp(SearchExt->channelGroup, oldName) == 0)
+ {
+ free(SearchExt->channelGroup);
+ SearchExt->channelGroup = strdup(newName);
+ }
+ SearchExt = SearchExts.Next(SearchExt);
+ }
+ ChannelGroups.Save();
+ SearchExts.Save();
+ cString strReturn = cString::sprintf("renamed channel group '%s' to '%s'", oldName, newName);
+ free(oldName);
+ return strReturn;
+
+ }
+ else
+ {
+ free(oldName);
+ ReplyCode = 901;
+ return cString::sprintf("channel group '%s' not defined", Option);
+ }
+ }
+ free(oldName);
+ }
ReplyCode = 901;
return cString("Error in channel group parameters");
}
diff --git a/epgsearchtools.c b/epgsearchtools.c
index f51e9be..7a08a9f 100644
--- a/epgsearchtools.c
+++ b/epgsearchtools.c
@@ -714,7 +714,7 @@ char* GetRawDescription(const char* descr)
while(tmp)
{
// extract a single line
- char* lf = strchr(tmp, '\n');
+ const char* lf = strchr(tmp, '\n');
char* line = NULL;
if (lf)
line = strndup(tmp, lf-tmp);
diff --git a/menu_dirselect.c b/menu_dirselect.c
index 40353ee..0fc7304 100644
--- a/menu_dirselect.c
+++ b/menu_dirselect.c
@@ -83,7 +83,7 @@ int cMenuDirSelect::Level(const char* szDir)
return 1;
do
{
- char* pos = strchr(szDir, '~');
+ const char* pos = strchr(szDir, '~');
if (pos)
{
iLevel++;
diff --git a/searchtimer_thread.c b/searchtimer_thread.c
index c2aca95..1a3fed1 100644
--- a/searchtimer_thread.c
+++ b/searchtimer_thread.c
@@ -600,8 +600,8 @@ char* cSearchTimerThread::SummaryExtended(cSearchExt* searchExt, cTimer* Timer,
if (!isempty(aux))
{
tmpaux = strdup(aux);
- char* begin = strstr(aux, "<epgsearch>");
- char* end = strstr(aux, "</epgsearch>");
+ const char* begin = strstr(aux, "<epgsearch>");
+ const char* end = strstr(aux, "</epgsearch>");
if (begin && end)
{
if (begin == aux) strcpy(tmpaux, ""); else strn0cpy(tmpaux, aux, begin-aux+1);