diff options
-rw-r--r-- | pjsip/src/pjsip/sip_parser.c | 14 | ||||
-rw-r--r-- | pjsip/src/test/uri_test.c | 4 |
2 files changed, 11 insertions, 7 deletions
diff --git a/pjsip/src/pjsip/sip_parser.c b/pjsip/src/pjsip/sip_parser.c index c18faa3d..cf3b879f 100644 --- a/pjsip/src/pjsip/sip_parser.c +++ b/pjsip/src/pjsip/sip_parser.c @@ -1149,14 +1149,18 @@ static void parse_param_imp( pj_scanner *scanner, pj_pool_t *pool, pvalue->ptr++; pvalue->slen -= 2; } - } else if (*scanner->curptr == '[') { + // } else if (*scanner->curptr == '[') { /* pvalue can be a quoted IPv6; in this case, the * '[' and ']' quote characters are to be removed - * from the pvalue. + * from the pvalue. + * + * Update: this seems to be unnecessary and may cause + * parsing error for cases such as IPv6 reference with + * port number. */ - pj_scan_get_char(scanner); - pj_scan_get_until_ch(scanner, ']', pvalue); - pj_scan_get_char(scanner); + // pj_scan_get_char(scanner); + // pj_scan_get_until_ch(scanner, ']', pvalue); + // pj_scan_get_char(scanner); } else if(pj_cis_match(spec, *scanner->curptr)) { parser_get_and_unescape(scanner, pool, spec, esc_spec, pvalue); } diff --git a/pjsip/src/test/uri_test.c b/pjsip/src/test/uri_test.c index 9f0fd804..8b7c3a5f 100644 --- a/pjsip/src/test/uri_test.c +++ b/pjsip/src/test/uri_test.c @@ -722,7 +722,7 @@ static pjsip_uri *create_uri35( pj_pool_t *pool ) url = pjsip_sip_uri_create(pool, 0); url->user = pj_str("user"); url->host = pj_str("::1"); - url->maddr_param = pj_str("::01"); + url->maddr_param = pj_str("[::01]"); return (pjsip_uri*)url; } @@ -732,7 +732,7 @@ static pjsip_uri *create_uri36( pj_pool_t *pool ) pjsip_sip_uri *url; url = pjsip_sip_uri_create(pool, 0); url->host = pj_str("::1"); - url->maddr_param = pj_str("::01"); + url->maddr_param = pj_str("[::01]"); return (pjsip_uri*)url; } |