From e6070feeab6940a3566a59a7802f003fa4181093 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Mon, 3 Jan 2011 16:48:10 -0600 Subject: [PATCH] cleanup --- src/mod/endpoints/mod_sofia/sofia_presence.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/sofia_presence.c b/src/mod/endpoints/mod_sofia/sofia_presence.c index 68296052e6..04d5b0142e 100644 --- a/src/mod/endpoints/mod_sofia/sofia_presence.c +++ b/src/mod/endpoints/mod_sofia/sofia_presence.c @@ -2645,14 +2645,7 @@ void sofia_presence_handle_sip_i_publish(nua_t *nua, sofia_profile_t *profile, n if (sofia_test_pflag(profile, PFLAG_MULTIREG) && !open) { - char buf[32] = ""; - - sql = switch_mprintf("select count(*) from sip_registrations where " - "sip_user='%q' and (sip_host='%q' or presence_hosts like '%%%q%%')", from_user, from_host, from_host); - - sofia_glue_execute_sql2str(profile, profile->ireg_mutex, sql, buf, sizeof(buf)); - switch_safe_free(sql); - count = atoi(buf); + count = sofia_reg_reg_count(profile, from_user, from_host); }