]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
automerge commit
authorAutomerge script <automerge@asterisk.org>
Tue, 28 Mar 2006 00:07:31 +0000 (00:07 +0000)
committerAutomerge script <automerge@asterisk.org>
Tue, 28 Mar 2006 00:07:31 +0000 (00:07 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@15423 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 8e668509d34447a519512d535dbccf72aa7ebfac..19f6991e44ae6c1b219536482683fc28dd119d3e 100644 (file)
@@ -5461,6 +5461,8 @@ static int transmit_register(struct sip_registry *r, int sipmethod, char *auth,
                ast_copy_string(r->callid, p->callid, sizeof(r->callid));
                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;
                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 */
@@ -11542,8 +11544,9 @@ static int sip_poke_peer(struct sip_peer *peer)
        }
        memcpy(&p->sa, &peer->addr, sizeof(p->sa));
        memcpy(&p->recv, &peer->addr, sizeof(p->sa));
+       ast_copy_flags(peer, &global_flags, SIP_FLAGS_TO_COPY);
 
-       /* Send options to peer's fullcontact */
+       /* Send OPTIONs to peer's fullcontact */
        if (!ast_strlen_zero(peer->fullcontact)) {
                ast_copy_string (p->fullcontact, peer->fullcontact, sizeof(p->fullcontact));
        }