]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Issue #6823
authorOlle Johansson <oej@edvina.net>
Wed, 29 Mar 2006 00:58:49 +0000 (00:58 +0000)
committerOlle Johansson <oej@edvina.net>
Wed, 29 Mar 2006 00:58:49 +0000 (00:58 +0000)
- Portability issue with the registration port number patch from yesterday.
  Be compatible with more systems than OS/X :-)
  Thanks Rizzo for the advice.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@15898 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index ff36a847d1f929bde06fc5412a784c3112b553f3..046fa5eb0339cdfed27e29e3d94bb2afcbb5be78 100644 (file)
@@ -5375,7 +5375,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, 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 */