[asterisk-commits] oej: trunk r47341 - /trunk/channels/chan_sip.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Wed Nov 8 15:35:22 MST 2006
Author: oej
Date: Wed Nov 8 16:35:22 2006
New Revision: 47341
URL: http://svn.digium.com/view/asterisk?rev=47341&view=rev
Log:
- Add Max-Forwards higher in the packet, following recommendations
- Fix documentation for sip_pvt_lock/unlock - doxygen does not inherit like zapata.conf !!!
- Change doc for a sip_pvt setting
Modified:
trunk/channels/chan_sip.c
Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?rev=47341&r1=47340&r2=47341&view=diff
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Wed Nov 8 16:35:22 2006
@@ -1109,8 +1109,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 ast_ha *ha; /*!< Access control list */
struct ast_variable *chanvars; /*!< Variables to set for channel created by user */
@@ -1577,15 +1576,13 @@
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)
{
ast_mutex_lock(&pvt->pvt_lock);
}
+/*! \brief Helper function to unlock pvt, hiding the underlying locking mechanism. */
static void sip_pvt_unlock(struct sip_pvt *pvt)
{
ast_mutex_unlock(&pvt->pvt_lock);
@@ -5638,6 +5635,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");
@@ -5670,7 +5668,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);
@@ -6694,6 +6691,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 */
@@ -6709,7 +6707,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);
}
@@ -7270,12 +7267,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