]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
cleanup
authorAnthony Minessale <anthm@freeswitch.org>
Mon, 3 Jan 2011 22:48:10 +0000 (16:48 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Mon, 3 Jan 2011 22:48:10 +0000 (16:48 -0600)
src/mod/endpoints/mod_sofia/sofia_presence.c

index 68296052e64c94362963c9c53980e5a40a8ffb8e..04d5b0142e2dce917059f49f5fb253ab462c7ddb 100644 (file)
@@ -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);
                        }