[xiph-commits] r13560 - icecast/trunk/httpp
karl at svn.xiph.org
karl at svn.xiph.org
Thu Aug 16 15:52:24 PDT 2007
Author: karl
Date: 2007-08-16 15:52:24 -0700 (Thu, 16 Aug 2007)
New Revision: 13560
Modified:
icecast/trunk/httpp/httpp.c
icecast/trunk/httpp/httpp.h
Log:
const updates, again no functional change
Modified: icecast/trunk/httpp/httpp.c
===================================================================
--- icecast/trunk/httpp/httpp.c 2007-08-16 22:49:13 UTC (rev 13559)
+++ icecast/trunk/httpp/httpp.c 2007-08-16 22:52:24 UTC (rev 13560)
@@ -129,7 +129,7 @@
}
}
-int httpp_parse_response(http_parser_t *parser, char *http_data, unsigned long len, char *uri)
+int httpp_parse_response(http_parser_t *parser, const char *http_data, unsigned long len, const char *uri)
{
char *data;
char *line[MAX_HEADERS];
@@ -201,7 +201,7 @@
return -1;
}
-static char *url_escape(char *src)
+static char *url_escape(const char *src)
{
int len = strlen(src);
unsigned char *decoded;
@@ -211,7 +211,7 @@
decoded = calloc(1, len + 1);
- dst = decoded;
+ dst = (char *)decoded;
for(i=0; i < len; i++) {
switch(src[i]) {
@@ -248,7 +248,7 @@
*dst = 0; /* null terminator */
- return decoded;
+ return (char *)decoded;
}
/** TODO: This is almost certainly buggy in some cases */
@@ -285,7 +285,7 @@
}
}
-int httpp_parse(http_parser_t *parser, char *http_data, unsigned long len)
+int httpp_parse(http_parser_t *parser, const char *http_data, unsigned long len)
{
char *data, *tmp;
char *line[MAX_HEADERS]; /* limited to 32 lines, should be more than enough */
@@ -446,7 +446,7 @@
}
}
-char *httpp_getvar(http_parser_t *parser, const char *name)
+const char *httpp_getvar(http_parser_t *parser, const char *name)
{
http_var_t var;
http_var_t *found;
@@ -465,7 +465,7 @@
return NULL;
}
-void httpp_set_query_param(http_parser_t *parser, char *name, char *value)
+void httpp_set_query_param(http_parser_t *parser, const char *name, const char *value)
{
http_var_t *var;
@@ -486,14 +486,14 @@
}
}
-char *httpp_get_query_param(http_parser_t *parser, char *name)
+const char *httpp_get_query_param(http_parser_t *parser, const char *name)
{
http_var_t var;
http_var_t *found;
void *fp;
fp = &found;
- var.name = name;
+ var.name = (char *)name;
var.value = NULL;
if (avl_get_by_key(parser->queryvars, (void *)&var, fp) == 0)
Modified: icecast/trunk/httpp/httpp.h
===================================================================
--- icecast/trunk/httpp/httpp.h 2007-08-16 22:49:13 UTC (rev 13559)
+++ icecast/trunk/httpp/httpp.h 2007-08-16 22:52:24 UTC (rev 13560)
@@ -58,13 +58,13 @@
http_parser_t *httpp_create_parser(void);
void httpp_initialize(http_parser_t *parser, http_varlist_t *defaults);
-int httpp_parse(http_parser_t *parser, char *http_data, unsigned long len);
-int httpp_parse_icy(http_parser_t *parser, char *http_data, unsigned long len);
-int httpp_parse_response(http_parser_t *parser, char *http_data, unsigned long len, char *uri);
+int httpp_parse(http_parser_t *parser, const char *http_data, unsigned long len);
+int httpp_parse_icy(http_parser_t *parser, const char *http_data, unsigned long len);
+int httpp_parse_response(http_parser_t *parser, const char *http_data, unsigned long len, const char *uri);
void httpp_setvar(http_parser_t *parser, const char *name, const char *value);
-char *httpp_getvar(http_parser_t *parser, const char *name);
-void httpp_set_query_param(http_parser_t *parser, char *name, char *value);
-char *httpp_get_query_param(http_parser_t *parser, char *name);
+const char *httpp_getvar(http_parser_t *parser, const char *name);
+void httpp_set_query_param(http_parser_t *parser, const char *name, const char *value);
+const char *httpp_get_query_param(http_parser_t *parser, const char *name);
void httpp_destroy(http_parser_t *parser);
void httpp_clear(http_parser_t *parser);
More information about the commits
mailing list