Commit 0780668e authored by jehan's avatar jehan
Browse files

simplify generic uri to_string

parent 379bd1a5
......@@ -60,7 +60,7 @@ else
CFLAGS="$CFLAGS -g"
fi
STRICT_OPTIONS=" -Wall -Werror -Wno-unknown-pragmas -Wno-error=unknown-pragmas"
STRICT_OPTIONS=" -Wall -Werror -Wno-error=unknown-pragmas"
case "$CC" in
*clang*)
......
......@@ -103,14 +103,10 @@ belle_sip_error_code belle_generic_uri_marshal(const belle_generic_uri_t* uri, c
}
if (uri->path) {
error=belle_sip_snprintf(buff,buff_size,offset,"/");
char* escaped_path=belle_generic_uri_to_escaped_path(uri->path);
error=belle_sip_snprintf(buff,buff_size,offset,"%s",escaped_path);
belle_sip_free(escaped_path);
if (error!=BELLE_SIP_OK) return error;
if (*(uri->path+1) != '\0') { /*+1 to skip leading /*/
char* escaped_path=belle_generic_uri_to_escaped_path(uri->path+1);
error=belle_sip_snprintf(buff,buff_size,offset,"%s",escaped_path);
belle_sip_free(escaped_path);
if (error!=BELLE_SIP_OK) return error;
}
}
if (uri->query) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment