Finished const-ifications as suggested by Erik Johansson in

SF Patch tracker [ 1587272 ].


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@109 119443c7-1b9e-41f8-b6fc-b9c35fce742c
This commit is contained in:
Marcelo Roberto Jimenez
2006-12-23 22:43:32 +00:00
parent 17db87ab96
commit fd19d54144
8 changed files with 36 additions and 30 deletions

View File

@@ -246,18 +246,19 @@ get_node_value( IN IXML_Node * node )
****************************************************************************/
static XINLINE int
get_host_and_path( IN char *ctrl_url,
OUT memptr * host,
OUT memptr * path,
OUT const memptr *host,
OUT const memptr *path,
OUT uri_type * url )
{
if( parse_uri( ctrl_url, strlen( ctrl_url ), url ) != HTTP_SUCCESS ) {
return -1;
}
host->buf = url->hostport.text.buff;
host->length = url->hostport.text.size;
// This is done to ensure that the buffer is kept const
((memptr *)host)->buf = (char *)url->hostport.text.buff;
((memptr *)host)->length = url->hostport.text.size;
path->buf = url->pathquery.buff;
path->length = url->pathquery.size;
((memptr *)path)->buf = (char *)url->pathquery.buff;
((memptr *)path)->length = url->pathquery.size;
return 0;
}
@@ -885,8 +886,8 @@ SoapGetServiceVarStatus( IN char *action_url,
IN char *var_name,
OUT char **var_value )
{
memptr host; // value for HOST header
memptr path; // ctrl path in first line in msg
const memptr host; // value for HOST header
const memptr path; // ctrl path in first line in msg
uri_type url;
membuffer request;
int ret_code;