From 88e37acdcd58a26b17888100428d0c07adc7f708 Mon Sep 17 00:00:00 2001 From: Olle Johansson <oej@edvina.net> Date: Thu, 2 Feb 2006 20:18:31 +0000 Subject: [PATCH] - Make debug logging for each authentication (twice per call) optional - Small update to doxygen comment git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9104 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_sip.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 61538d9a4a..6c6abb6e6b 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -693,7 +693,7 @@ static struct sip_pvt { 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 @@ static int create_addr_from_peer(struct sip_pvt *r, struct sip_peer *peer) 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); -- GitLab