summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlle Johansson <oej@edvina.net>2006-03-29 01:01:09 +0000
committerOlle Johansson <oej@edvina.net>2006-03-29 01:01:09 +0000
commitb366c4062eb1b6bf1efdb7e143a444bd5f3b96fc (patch)
tree4263cba9753d3618986dcc249cf7fdc053e3413b
parentc379ae88961398b79371bda684b21cea8614f954 (diff)
Issue #6823 - Registration and port numbers. (from 1.2)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15905 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--channels/chan_sip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index d56909a2f..e776bab66 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -5610,7 +5610,7 @@ static int transmit_register(struct sip_registry *r, int sipmethod, char *auth,
if (r->portno)
p->sa.sin_port = htons(r->portno);
else /* Set registry port to the port set from the peer definition/srv or default */
- r->portno = p->sa.sin_port;
+ r->portno = ntohs(p->sa.sin_port);
ast_set_flag(&p->flags[0], SIP_OUTGOING); /* Registration is outgoing call */
r->call=p; /* Save pointer to SIP packet */
p->registry = ASTOBJ_REF(r); /* Add pointer to registry in packet */