[asterisk-commits] russell: branch 1.8 r318055 - /branches/1.8/channels/chan_iax2.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat May 7 18:24:24 CDT 2011


Author: russell
Date: Sat May  7 18:24:18 2011
New Revision: 318055

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=318055
Log:
chan_iax2: Don't overwrite port found with an SRV lookup.

(closes issue #17291)
Reported by: jcovert
Patches:
      chan_iax2.c.1.8.3-srvlookup-corrected.patch uploaded by jcovert (license 551)

Modified:
    branches/1.8/channels/chan_iax2.c

Modified: branches/1.8/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/channels/chan_iax2.c?view=diff&rev=318055&r1=318054&r2=318055
==============================================================================
--- branches/1.8/channels/chan_iax2.c (original)
+++ branches/1.8/channels/chan_iax2.c Sat May  7 18:24:18 2011
@@ -4555,7 +4555,9 @@
 			return -1;
 		}
 		ast_sockaddr_to_sin(&sin_tmp, sin);
-		sin->sin_port = htons(IAX_DEFAULT_PORTNO);
+		if (sin->sin_port == 0) {
+			sin->sin_port = htons(IAX_DEFAULT_PORTNO);
+		}
 		/* use global iax prefs for unknown peer/user */
 		/* But move the calling channel's native codec to the top of the preference list */
 		memcpy(&ourprefs, &prefs, sizeof(ourprefs));




More information about the asterisk-commits mailing list