[asterisk-commits] trunk r9104 - /trunk/channels/chan_sip.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Feb 2 13:18:34 MST 2006


Author: oej
Date: Thu Feb  2 14:18:31 2006
New Revision: 9104

URL: http://svn.digium.com/view/asterisk?rev=9104&view=rev
Log:
- Make debug logging for each authentication (twice per call) optional
- Small update to doxygen comment

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=9104&r1=9103&r2=9104&view=diff
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Thu Feb  2 14:18:31 2006
@@ -693,7 +693,7 @@
 	time_t ospstart;			/*!< OSP Start time */
 	unsigned int osptimelimit;		/*!< OSP call duration limit */
 #endif
-	struct sip_request initreq;		/*!< Initial request */
+	struct sip_request initreq;		/*!< Initial request that opened the SIP dialog */
 	
 	int maxtime;				/*!< Max time for first response */
 	int initid;				/*!< Auto-congest ID if appropriate */
@@ -1910,11 +1910,13 @@
 	r->capability = peer->capability;
 	r->prefs = peer->prefs;
 	if (r->rtp) {
-		ast_log(LOG_DEBUG, "Setting NAT on RTP to %d\n", (ast_test_flag(r, SIP_NAT) & SIP_NAT_ROUTE));
+		if (option_debug)
+			ast_log(LOG_DEBUG, "Setting NAT on RTP to %d\n", (ast_test_flag(r, SIP_NAT) & SIP_NAT_ROUTE));
 		ast_rtp_setnat(r->rtp, (ast_test_flag(r, SIP_NAT) & SIP_NAT_ROUTE));
 	}
 	if (r->vrtp) {
-		ast_log(LOG_DEBUG, "Setting NAT on VRTP to %d\n", (ast_test_flag(r, SIP_NAT) & SIP_NAT_ROUTE));
+		if (option_debug)
+			ast_log(LOG_DEBUG, "Setting NAT on VRTP to %d\n", (ast_test_flag(r, SIP_NAT) & SIP_NAT_ROUTE));
 		ast_rtp_setnat(r->vrtp, (ast_test_flag(r, SIP_NAT) & SIP_NAT_ROUTE));
 	}
 	ast_string_field_set(r, peername, peer->username);



More information about the asterisk-commits mailing list