From 99a4b08ffdd564b49e1b0e7c83e3b7b28c767913 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Tue, 12 Jan 2010 01:23:19 +0000 Subject: [PATCH] make debug a little less noisy when no proxy acls are set git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16254 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_sofia/sofia.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index e41d7a2e4c..6dc82d7db8 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -5420,7 +5420,9 @@ void sofia_handle_sip_i_invite(nua_t *nua, sofia_profile_t *profile, nua_handle_ } else { int network_ip_is_proxy = 0; /* Check if network_ip is a proxy allowed to send us calls */ - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%d acls to check for proxy\n", profile->proxy_acl_count); + if (profile->proxy_acl_count) { + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%d acls to check for proxy\n", profile->proxy_acl_count); + } for (x = 0; x < profile->proxy_acl_count; x++) { last_acl = profile->proxy_acl[x]; @@ -5438,9 +5440,9 @@ void sofia_handle_sip_i_invite(nua_t *nua, sofia_profile_t *profile, nua_handle_ * if network_ip is a proxy allowed to send calls, check for auth * ip header and see if it matches against the inbound acl */ - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "network ip is a proxy [%d]\n", network_ip_is_proxy); - if (network_ip_is_proxy) { + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "network ip is a proxy\n"); + for (un = sip->sip_unknown; un; un = un->un_next) { if (!strcasecmp(un->un_name, "X-AUTH-IP")) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,