summaryrefslogtreecommitdiff
path: root/media-sound/peercast/files/peercast-0.1218-glibc-2.10.patch
blob: 3f290578dd50ac23df9ed069603c53f8100e5c25 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
Index: work/core/common/common.h
===================================================================
--- work.orig/core/common/common.h
+++ work/core/common/common.h
@@ -274,7 +274,7 @@ inline int strToID(char *str)
 }
 
 // -----------------------------------
-char *getCGIarg(const char *str, const char *arg);
+const char *getCGIarg(const char *str, const char *arg);
 bool cmpCGIarg(char *str, char *arg, char *value);
 bool hasCGIarg(char *str, char *arg);
 
Index: work/core/common/html.cpp
===================================================================
--- work.orig/core/common/html.cpp
+++ work/core/common/html.cpp
@@ -103,7 +103,7 @@ void HTML::writeVariable(Stream &s,const
 			r = true;
 		}else if (varName.startsWith("loop.hit."))
 		{
-			char *idstr = getCGIarg(tmplArgs,"id=");
+			const char *idstr = getCGIarg(tmplArgs,"id=");
 			if (idstr)
 			{
 				GnuID id;
@@ -136,7 +136,7 @@ void HTML::writeVariable(Stream &s,const
 	{
 		if (varName.startsWith("page.channel."))
 		{
-			char *idstr = getCGIarg(tmplArgs,"id=");
+			const char *idstr = getCGIarg(tmplArgs,"id=");
 			if (idstr)
 			{
 				GnuID id;
@@ -150,7 +150,7 @@ void HTML::writeVariable(Stream &s,const
 
 			String v = varName+5;
 			v.append('=');
-			char *a = getCGIarg(tmplArgs,v);
+			const char *a = getCGIarg(tmplArgs,v);
 			if (a)
 			{
 				s.writeString(a);		
Index: work/core/common/sys.cpp
===================================================================
--- work.orig/core/common/sys.cpp
+++ work/core/common/sys.cpp
@@ -740,12 +740,12 @@ void LogBuffer::write(const char *str, T
 }
 
 // -----------------------------------
-char *getCGIarg(const char *str, const char *arg)
+const char *getCGIarg(const char *str, const char *arg)
 {
 	if (!str)
 		return NULL;
 
-	char *s = strstr(str,arg);
+	const char *s = strstr(str,arg);
 
 	if (!s)
 		return NULL;
Index: work/core/common/servhs.cpp
===================================================================
--- work.orig/core/common/servhs.cpp
+++ work/core/common/servhs.cpp
@@ -150,10 +150,10 @@ void Servent::handshakeHTTP(HTTP &http, 
 			if (!isAllowed(ALLOW_BROADCAST))
 				throw HTTPException(HTTP_SC_UNAVAILABLE,503);
 
-			char *pwdArg = getCGIarg(fn,"pass=");
-			char *songArg = getCGIarg(fn,"song=");
-			char *mountArg = getCGIarg(fn,"mount=");
-			char *urlArg = getCGIarg(fn,"url=");
+			const char *pwdArg = getCGIarg(fn,"pass=");
+			const char *songArg = getCGIarg(fn,"song=");
+			const char *mountArg = getCGIarg(fn,"mount=");
+			const char *urlArg = getCGIarg(fn,"url=");
 
 			if (pwdArg && songArg)
 			{
@@ -560,7 +560,7 @@ bool Servent::handshakeAuth(HTTP &http,c
 	char user[64],pass[64];
 	user[0] = pass[0] = 0;
 
-	char *pwd  = getCGIarg(args, "pass=");
+	const char *pwd  = getCGIarg(args, "pass=");
 
 	if ((pwd) && strlen(servMgr->password))
 	{
@@ -671,7 +671,7 @@ void Servent::handshakeCMD(char *cmd)
 	{
 		if (cmpCGIarg(cmd,"cmd=","redirect"))
 		{
-			char *j = getCGIarg(cmd,"url=");
+			const char *j = getCGIarg(cmd,"url=");
 			if (j)
 			{
 				termArgs(cmd);
@@ -1079,7 +1079,7 @@ void Servent::handshakeCMD(char *cmd)
 					index++;
 				}
 
-				char *findArg = getCGIarg(cmd,"keywords=");
+				const char *findArg = getCGIarg(cmd,"keywords=");
 
 				if (hasCGIarg(cmd,"relay"))
 				{