[svn-commits] qwell: branch 1.6.1 r137815 - in /branches/1.6.1: ./ channels/chan_sip.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Aug 14 10:39:25 CDT 2008


Author: qwell
Date: Thu Aug 14 10:39:24 2008
New Revision: 137815

URL: http://svn.digium.com/view/asterisk?view=rev&rev=137815
Log:
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

........

Modified:
    branches/1.6.1/   (props changed)
    branches/1.6.1/channels/chan_sip.c

Propchange: branches/1.6.1/
------------------------------------------------------------------------------
--- trunk-merged (original)
+++ trunk-merged Thu Aug 14 10:39:24 2008
@@ -1,1 +1,1 @@
-/trunk:1-137647,137680,137732,137780
+/trunk:1-137647,137680,137732,137780,137812

Modified: branches/1.6.1/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/channels/chan_sip.c?view=diff&rev=137815&r1=137814&r2=137815
==============================================================================
--- branches/1.6.1/channels/chan_sip.c (original)
+++ branches/1.6.1/channels/chan_sip.c Thu Aug 14 10:39:24 2008
@@ -4343,7 +4343,7 @@
 		memcpy(&dialog->sa.sin_addr, &sin->sin_addr, sizeof(dialog->sa.sin_addr));
 		if (!sin->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;
 			}
 		} else {
@@ -4380,6 +4380,8 @@
 
 	if (!dialog->socket.type)
 		dialog->socket.type = SIP_TRANSPORT_UDP;
+	if (!dialog->socket.port)
+		dialog->socket.port = bindaddr.sin_port;
 	dialog->sa.sin_port = htons(portno);
 	dialog->recv = dialog->sa;
 	return 0;




More information about the svn-commits mailing list