[asterisk-commits] rizzo: branch rizzo/astobj2 r47425 - /team/rizzo/astobj2/channels/chan_sip.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Nov 10 08:20:03 MST 2006


Author: rizzo
Date: Fri Nov 10 09:20:02 2006
New Revision: 47425

URL: http://svn.digium.com/view/asterisk?view=rev&rev=47425
Log:
merge version 47341, move Max-Forwards upper in the packet


Modified:
    team/rizzo/astobj2/channels/chan_sip.c

Modified: team/rizzo/astobj2/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/rizzo/astobj2/channels/chan_sip.c?view=diff&rev=47425&r1=47424&r2=47425
==============================================================================
--- team/rizzo/astobj2/channels/chan_sip.c (original)
+++ team/rizzo/astobj2/channels/chan_sip.c Fri Nov 10 09:20:02 2006
@@ -1151,8 +1151,7 @@
 	int pokeexpire;			/*!<  When to expire poke (qualify= checking) */
 	int lastms;			/*!<  How long last response took (in ms), or -1 for no response */
 	int maxms;			/*!<  Max ms we will accept for the host to be up, 0 to not monitor */
-	struct timeval ps;		/*!<  Ping send time */
-	
+	struct timeval ps;		/*!<  Time for sending SIP OPTION in sip_pke_peer() */
 	struct sockaddr_in defaddr;	/*!<  Default IP address, used until registration */
 	struct sip_pvt *mwi_pvt;		/*!<  Subscription for MWI */
 	int lastmsg;
@@ -1631,10 +1630,7 @@
 	get_codec: sip_get_codec,
 };
 
-/*!
- * Helper functions to lock/unlock pvt, hiding the
- * underlying locking mechanism.
- */
+/*! \brief Helper function to lock, hiding the underlying locking mechanism.  */
 static void sip_pvt_lock(struct sip_pvt *pvt)
 {
 #ifdef USE_AO2
@@ -1644,6 +1640,7 @@
 #endif
 }
 
+/*! \brief Helper function to unlock pvt, hiding the underlying locking mechanism. */
 static void sip_pvt_unlock(struct sip_pvt *pvt)
 {
 #ifdef USE_AO2
@@ -5804,6 +5801,7 @@
 		set_destination(p, p->route->hop);
 		add_route(req, is_strict ? p->route->next : p->route);
 	}
+	add_header(req, "Max-Forwards", DEFAULT_MAX_FORWARDS);
 
 	ot = get_header(orig, "To");
 	of = get_header(orig, "From");
@@ -5836,7 +5834,6 @@
 	add_header(req, "CSeq", tmp);
 
 	add_header(req, "User-Agent", global_useragent);
-	add_header(req, "Max-Forwards", DEFAULT_MAX_FORWARDS);
 
 	if (!ast_strlen_zero(p->rpid))
 		add_header(req, "Remote-Party-ID", p->rpid);
@@ -6860,6 +6857,7 @@
 	snprintf(tmp, sizeof(tmp), "%d %s", ++p->ocseq, sip_methods[sipmethod].text);
 
 	add_header(req, "Via", p->via);
+	add_header(req, "Max-Forwards", DEFAULT_MAX_FORWARDS);
 	/* SLD: FIXME?: do Route: here too?  I think not cos this is the first request.
 	 * OTOH, then we won't have anything in p->route anyway */
 	/* Build Remote Party-ID and From */
@@ -6875,7 +6873,6 @@
 	add_header(req, "Call-ID", p->callid);
 	add_header(req, "CSeq", tmp);
 	add_header(req, "User-Agent", global_useragent);
-	add_header(req, "Max-Forwards", DEFAULT_MAX_FORWARDS);
 	if (!ast_strlen_zero(p->rpid))
 		add_header(req, "Remote-Party-ID", p->rpid);
 }
@@ -7443,12 +7440,12 @@
 
 	build_via(p);
 	add_header(&req, "Via", p->via);
+	add_header(&req, "Max-Forwards", DEFAULT_MAX_FORWARDS);
 	add_header(&req, "From", from);
 	add_header(&req, "To", to);
 	add_header(&req, "Call-ID", p->callid);
 	add_header(&req, "CSeq", tmp);
 	add_header(&req, "User-Agent", global_useragent);
-	add_header(&req, "Max-Forwards", DEFAULT_MAX_FORWARDS);
 
 	
 	if (auth) 	/* Add auth header */



More information about the asterisk-commits mailing list