diff options
author | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-08-14 15:37:35 +0000 |
---|---|---|
committer | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-08-14 15:37:35 +0000 |
commit | 0c708da364ce9bf578c28f3fd2f618fac687c644 (patch) | |
tree | 1d2766f4ec86620170317afe60d89fff7687a687 /channels | |
parent | f3bf40f085a7fcaa1ce478b98c4c0a621b3ef60d (diff) |
Merged revisions 137812 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r137812 | qwell | 2008-08-14 10:32:16 -0500 (Thu, 14 Aug 2008) | 8 lines
Make sure we set the socket port, so we don't try to use <ip address>:0.
(closes issue #13255)
Reported by: falves11
Patches:
13255-socketport.diff uploaded by qwell (license 4)
Tested by: falves11
........
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@137814 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 66a5fdf3e..6b7622127 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -4158,8 +4158,10 @@ static int create_addr(struct sip_pvt *dialog, const char *opeer) hostn = peername; if (!dialog->socket.type) dialog->socket.type = SIP_TRANSPORT_UDP; + if (!dialog->socket.port) + dialog->socket.port = bindaddr.sin_port; if (ast_strlen_zero(port) || sscanf(port, "%u", &portno) != 1) { - portno = dialog->socket.type & SIP_TRANSPORT_TLS ? + portno = (dialog->socket.type & SIP_TRANSPORT_TLS) ? STANDARD_TLS_PORT : STANDARD_SIP_PORT; } if (global_srvlookup) { |