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: https://origsvn.digium.com/svn/asterisk/trunk@318056 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant
2011-05-07 23:26:05 +00:00
parent 8c0b1115cd
commit 3736b02d97

View File

@@ -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));