]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-2961
authorBrian West <brian@freeswitch.org>
Wed, 5 Jan 2011 17:32:00 +0000 (11:32 -0600)
committerBrian West <brian@freeswitch.org>
Wed, 5 Jan 2011 17:32:10 +0000 (11:32 -0600)
src/mod/endpoints/mod_sofia/sofia_reg.c

index fddf1b7236e649ab6b81d1ecb5c6579c0ac28be1..0b7d0f33fa59cfc8f36decfd95fa81d62c1442d0 100644 (file)
@@ -1314,7 +1314,9 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand
                if (sofia_reg_reg_count(profile, to_user, reg_host) == 1) {
                        sql = switch_mprintf("delete from sip_presence where sip_user='%q' and sip_host='%q' and profile_name='%q' and open_closed='closed'", 
                                                                 to_user, reg_host, profile->name);
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "DELETE PRESENCE SQL: %s\n", sql);
+                       if (mod_sofia_globals.debug_presence > 0) {
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "DELETE PRESENCE SQL: %s\n", sql);
+                       }
                        sofia_glue_execute_sql_now(profile, &sql, SWITCH_TRUE);
                }