diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2011-05-07 23:26:05 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2011-05-07 23:26:05 +0000 |
commit | 6ba8a7efc94353bf13bfcdc55fec338223b5ab05 (patch) | |
tree | 564c7c8bf828c38a4b02ca8cce366f40a8baacab /channels | |
parent | 2d487374f0ae94293a7622214105ec5b94619456 (diff) |
Merged revisions 318055 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r318055 | russell | 2011-05-07 18:24:18 -0500 (Sat, 07 May 2011) | 7 lines
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)
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@318056 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_iax2.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 45410f64f..dab0bd9d1 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -4638,7 +4638,9 @@ static int create_addr(const char *peername, struct ast_channel *c, struct socka 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)); |