From: Anthony Minessale Date: Mon, 3 Jan 2011 22:48:10 +0000 (-0600) Subject: cleanup X-Git-Tag: v1.2-rc1~223^2~2^2^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e6070feeab6940a3566a59a7802f003fa4181093;p=thirdparty%2Ffreeswitch.git cleanup --- 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); }