Commit 737afcd5 authored by Guillaume Beraudo's avatar Guillaume Beraudo

Fix outbound access.

parent 1eee5504
...@@ -827,7 +827,7 @@ static void print_noescapes_map(char noescapes[BELLE_SIP_NO_ESCAPES_SIZE], const ...@@ -827,7 +827,7 @@ static void print_noescapes_map(char noescapes[BELLE_SIP_NO_ESCAPES_SIZE], const
static const char *get_uri_username_noescapes() { static const char *get_uri_username_noescapes() {
static char noescapes[BELLE_SIP_NO_ESCAPES_SIZE] = {0}; static char noescapes[BELLE_SIP_NO_ESCAPES_SIZE] = {0};
if (noescapes[BELLE_SIP_NO_ESCAPES_SIZE] == 0) { if (noescapes[BELLE_SIP_NO_ESCAPES_SIZE-1] == 0) {
// concurrent initialization should not be an issue // concurrent initialization should not be an issue
noescapes_add_list(noescapes, "[]/?:+$-_.!~*\()"); noescapes_add_list(noescapes, "[]/?:+$-_.!~*\()");
noescapes_add_alfanums(noescapes); noescapes_add_alfanums(noescapes);
...@@ -839,7 +839,7 @@ static const char *get_uri_username_noescapes() { ...@@ -839,7 +839,7 @@ static const char *get_uri_username_noescapes() {
static const char *get_uri_parameter_noescapes() { static const char *get_uri_parameter_noescapes() {
static char noescapes[BELLE_SIP_NO_ESCAPES_SIZE] = {0}; static char noescapes[BELLE_SIP_NO_ESCAPES_SIZE] = {0};
if (noescapes[BELLE_SIP_NO_ESCAPES_SIZE] == 0) { if (noescapes[BELLE_SIP_NO_ESCAPES_SIZE-1] == 0) {
/* /*
uri-parameters = *( ";" uri-parameter) uri-parameters = *( ";" uri-parameter)
uri-parameter = transport-param / user-param / method-p*aram uri-parameter = transport-param / user-param / method-p*aram
......
...@@ -200,7 +200,7 @@ static void test_escaped_parameter(void) { ...@@ -200,7 +200,7 @@ static void test_escaped_parameter(void) {
belle_sip_uri_t * L_uri = belle_sip_uri_parse("sip:toto@titi.com;pa%3Dram=aa%40bb;o%40"); belle_sip_uri_t * L_uri = belle_sip_uri_parse("sip:toto@titi.com;pa%3Dram=aa%40bb;o%40");
char* l_raw_uri = belle_sip_object_to_string(BELLE_SIP_OBJECT(L_uri)); char* l_raw_uri = belle_sip_object_to_string(BELLE_SIP_OBJECT(L_uri));
belle_sip_object_unref(BELLE_SIP_OBJECT(L_uri)); belle_sip_object_unref(BELLE_SIP_OBJECT(L_uri));
L_tmp = belle_sip_uri_parse(l_raw_uri); // should not work in the general case... L_tmp = belle_sip_uri_parse(l_raw_uri);
L_uri = BELLE_SIP_URI(belle_sip_object_clone(BELLE_SIP_OBJECT(L_tmp))); L_uri = BELLE_SIP_URI(belle_sip_object_clone(BELLE_SIP_OBJECT(L_tmp)));
belle_sip_object_unref(BELLE_SIP_OBJECT(L_tmp)); belle_sip_object_unref(BELLE_SIP_OBJECT(L_tmp));
belle_sip_free(l_raw_uri); belle_sip_free(l_raw_uri);
......
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