From: RĂ©mi Denis-Courmont Date: Thu, 30 Aug 2007 21:29:51 +0000 (+0000) Subject: Add some const qualifiers X-Git-Tag: 0.9.0-test0~6043 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=653329ea28d847b195ccd6aad245e7884e27208a;p=vlc Add some const qualifiers --- diff --git a/include/vlc_httpd.h b/include/vlc_httpd.h index 9552c13ccc..e01e4d1006 100644 --- a/include/vlc_httpd.h +++ b/include/vlc_httpd.h @@ -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 */ diff --git a/src/network/httpd.c b/src/network/httpd.c index 09932fbdd0..a4929a7443 100644 --- a/src/network/httpd.c +++ b/src/network/httpd.c @@ -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;