[sr-dev] add_rcv_param wuses illegal chars in contact uri

Juha Heinanen jh at tutpro.com
Sun Nov 8 12:40:22 CET 2009


while testing alias_contact() function, i tried to steel some code from
nathelper add_rcv_param() function, but noticed that it adds illegal
chars to contact uri when it encloses the param in quotes ("):

		param[RECEIVED_LEN] = '\"';
		memcpy(param + RECEIVED_LEN + 1, uri.s, uri.len);
		param[RECEIVED_LEN + 1 + uri.len] = '\"';

i found out when twinkle complained about parse error in contact uri.  i
then went and checked from rfc3261 and twinkle is correct:

uri-parameter = transport-param / user-param / method-param
                 / ttl-param / maddr-param / lr-param / other-param
other-param = pname [ "=" pvalue ]
pvalue= 1*paramchar
paramchar = param-unreserved / unreserved / escaped
param-unreserved = [" / "]" / "/" / ":" / "&" / "+" / "$"

" is not listed in unreserved either. i don't know if anyone is
using that function.  if not, better remove it or fix it.

-- juha



More information about the sr-dev mailing list