[asterisk-commits] trunk r15382 - in /trunk: ./ channels/chan_sip.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Mar 27 16:49:46 MST 2006


Author: oej
Date: Mon Mar 27 17:49:44 2006
New Revision: 15382

URL: http://svn.digium.com/view/asterisk?rev=15382&view=rev
Log:
Issue #6736 - use flags for OPTIONs messages

Modified:
    trunk/   (props changed)
    trunk/channels/chan_sip.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?rev=15382&r1=15381&r2=15382&view=diff
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Mon Mar 27 17:49:44 2006
@@ -5584,7 +5584,7 @@
 			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 */
+		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 */
 		if (!ast_strlen_zero(r->secret))	/* Secret (password) */
@@ -11668,6 +11668,7 @@
 static int sip_poke_peer(struct sip_peer *peer)
 {
 	struct sip_pvt *p;
+
 	if (!peer->maxms || !peer->addr.sin_addr.s_addr) {
 		/* IF we have no IP, or this isn't to be monitored, return
 		  imeediately after clearing things out */
@@ -11688,8 +11689,10 @@
 	
 	memcpy(&p->sa, &peer->addr, sizeof(p->sa));
 	memcpy(&p->recv, &peer->addr, sizeof(p->sa));
-
-	/* Send options to peer's fullcontact */
+	ast_copy_flags(&peer->flags[0], &global_flags[0], SIP_FLAGS_TO_COPY);
+	ast_copy_flags(&peer->flags[1], &global_flags[1], SIP_PAGE2_FLAGS_TO_COPY);
+
+	/* Send OPTIONs to peer's fullcontact */
 	if (!ast_strlen_zero(peer->fullcontact))
 		ast_string_field_set(p, fullcontact, peer->fullcontact);
 



More information about the asterisk-commits mailing list