]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
make debug a little less noisy when no proxy acls are set
authorMichael Jerris <mike@jerris.com>
Tue, 12 Jan 2010 01:23:19 +0000 (01:23 +0000)
committerMichael Jerris <mike@jerris.com>
Tue, 12 Jan 2010 01:23:19 +0000 (01:23 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16254 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/sofia.c

index e41d7a2e4c48ebb171113794e837296243ccd44e..6dc82d7db8475568b52ea56bdc45afd9053b58dc 100644 (file)
@@ -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,