Add some const qualifiers
authorRémi Denis-Courmont <rem@videolan.org>
Thu, 30 Aug 2007 21:29:51 +0000 (21:29 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Thu, 30 Aug 2007 21:29:51 +0000 (21:29 +0000)
include/vlc_httpd.h
src/network/httpd.c

index 9552c13..e01e4d1 100644 (file)
@@ -141,7 +141,7 @@ VLC_EXPORT( int,              httpd_StreamSend,   ( httpd_stream_t *, uint8_t *p
 VLC_EXPORT( void,         httpd_MsgInit, ( httpd_message_t * )  );
 VLC_EXPORT( void,         httpd_MsgAdd, ( httpd_message_t *, const char *psz_name, const char *psz_value, ... ) );
 /* return "" if not found. The string is not allocated */
-VLC_EXPORT( const char *, httpd_MsgGet, ( httpd_message_t *, const char *psz_name ) );
+VLC_EXPORT( const char *, httpd_MsgGet, ( const httpd_message_t *, const char *psz_name ) );
 VLC_EXPORT( void,         httpd_MsgClean, ( httpd_message_t * ) );
 
 #endif /* _VLC_HTTPD_H */
index 09932fb..a4929a7 100644 (file)
@@ -384,7 +384,9 @@ struct httpd_file_t
 
 };
 
-static int httpd_FileCallBack( httpd_callback_sys_t *p_sys, httpd_client_t *cl, httpd_message_t *answer, httpd_message_t *query )
+static int
+httpd_FileCallBack( httpd_callback_sys_t *p_sys, httpd_client_t *cl,
+                    httpd_message_t *answer, const httpd_message_t *query )
 {
     httpd_file_t *file = (httpd_file_t*)p_sys;
     uint8_t *psz_args = query->psz_args;
@@ -504,7 +506,9 @@ struct httpd_handler_t
 
 };
 
-static int httpd_HandlerCallBack( httpd_callback_sys_t *p_sys, httpd_client_t *cl, httpd_message_t *answer, httpd_message_t *query )
+static int
+httpd_HandlerCallBack( httpd_callback_sys_t *p_sys, httpd_client_t *cl,
+                       httpd_message_t *answer, const httpd_message_t *query )
 {
     httpd_handler_t *handler = (httpd_handler_t*)p_sys;
     uint8_t *psz_args = query->psz_args;
@@ -628,7 +632,7 @@ struct httpd_redirect_t
 
 static int httpd_RedirectCallBack( httpd_callback_sys_t *p_sys,
                                    httpd_client_t *cl, httpd_message_t *answer,
-                                   httpd_message_t *query )
+                                   const httpd_message_t *query )
 {
     httpd_redirect_t *rdir = (httpd_redirect_t*)p_sys;
     char *p_body;
@@ -708,7 +712,7 @@ struct httpd_stream_t
 
 static int httpd_StreamCallBack( httpd_callback_sys_t *p_sys,
                                  httpd_client_t *cl, httpd_message_t *answer,
-                                 httpd_message_t *query )
+                                 const httpd_message_t *query )
 {
     httpd_stream_t *stream = (httpd_stream_t*)p_sys;
 
@@ -1333,7 +1337,7 @@ void httpd_MsgClean( httpd_message_t *msg )
     httpd_MsgInit( msg );
 }
 
-const char *httpd_MsgGet( httpd_message_t *msg, const char *name )
+const char *httpd_MsgGet( const httpd_message_t *msg, const char *name )
 {
     int i;