Juha,
Function t_loads contacts in tm/t_serial.c encodes the Request-URI and
all branches of the SIP message into an AVP. At the end the function
calls clear_branches to remove all branches from the SIP request, so
that a subsequent call to t_next_contacts can only restore those with
highest q number.
I am wondering if calling clear_branches is enough. Shouldn't the
function also call reset_dst_uri to reset the value of the dst_uri
(which is now also stored in the AVP), and perhaps also clear the send
socket, the branch flags and the path vector for the Request-URI?
All these values are encoded into the AVP, but they are only cleared
for additional branches (in clear_branches), but not for the
Request-URI "branch".
I also considered doing that in clear_branches, but then I realized
that this function is called from other places and modules and it
could break them.
Any thoughts on this? How thorough should t_load_contacts be when it
resets variables whose values are stored in the AVP?
-- Jan