[asterisk-dev] [Code Review] SIP various transport type issues
Russell Bryant
russell at digium.com
Mon Jun 15 15:21:27 CDT 2009
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.digium.com/r/278/#review849
-----------------------------------------------------------
/trunk/channels/chan_sip.c
<http://reviewboard.digium.com/r/278/#comment2064>
Align switch and case
/trunk/channels/chan_sip.c
<http://reviewboard.digium.com/r/278/#comment2065>
are these parens needed?
/trunk/channels/chan_sip.c
<http://reviewboard.digium.com/r/278/#comment2066>
You can use S_OR() in here
- Russell
On 2009-06-09 10:51:56, David Vossel wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.digium.com/r/278/
> -----------------------------------------------------------
>
> (Updated 2009-06-09 10:51:56)
>
>
> Review request for Asterisk Developers.
>
>
> Summary
> -------
>
> This is a combination of patches from vrban, mmichelson, and myself relating to (issue #13865).
>
> What this patch addresses:
>
> 1. ast_sip_ouraddrfor() by default binds to the UDP address/port reguardless if the sip->pvt is of type UDP or not. Now when no remapping is required, ast_sip_ouraddrfor() checks the sip_pvt's transport type, attempting to set the address and port to the correct TCP/TLS bindings if necessary.
>
> 2. It is not necessary to send the port number in the Contact header unless the port is non-standard for the transport type. This patch fixes this and removes the todo note.
>
> 3. In sip_alloc(), the default dialog built always uses transport type UDP. Now sip_alloc() looks at the sip_request (if present) and determines what transport type to use by default.
>
> 4. When changing the transport type of a sip_socket, the file descriptor must be set to -1 and in some cases the tcptls_session's ref count must be decremented and set to NULL. I've encountered several issues associated with this process and have created a function, set_socket_transport(), to handle the setting of the socket type.
>
>
> This addresses bug 13865.
> https://issues.asterisk.org/view.php?id=13865
>
>
> Diffs
> -----
>
> /trunk/channels/chan_sip.c 199297
>
> Diff: http://reviewboard.digium.com/r/278/diff
>
>
> Testing
> -------
>
> It appears through issue notes that vrban has tested items 1-3. I have only reviewed/cleaned up a few possible errors and done sanity checks on them. I have tested item 4. The function was previously used only for changing a peer's transport type. I simply expanded it to be used every time any socket's transport type is changed
>
>
> Thanks,
>
> David
>
>
More information about the asterisk-dev
mailing list