[sr-dev] reset dst_uri in t_load_contacts
Juha Heinanen
jh at tutpro.com
Sat Oct 17 09:41:03 CEST 2009
Jan Janak writes:
> 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?
jan,
may be so, but i have thought that script writer would not have set
dst_uri or send socket if script is calling next_contacts(). so i would
consider it a bug in the script if those things are set when
next_contacts() is called. on the other hand, it might not hurt to clear
them.
> 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".
if r-uri and all branches (if any) have the same q, then load_contacts()
does nothing and branches should not be cleared, because they are used
"as is" without loading them from contacts_avp.
> Any thoughts on this? How thorough should t_load_contacts be when it
> resets variables whose values are stored in the AVP?
see above. by the way, thanks for reading t_serial.c.
-- juha
More information about the sr-dev
mailing list