]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
mod_sofia: add sla indexes and fix where clause
authorMichael Jerris <mike@jerris.com>
Tue, 17 Feb 2009 00:30:11 +0000 (00:30 +0000)
committerMichael Jerris <mike@jerris.com>
Tue, 17 Feb 2009 00:30:11 +0000 (00:30 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12075 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/sofia_glue.c
src/mod/endpoints/mod_sofia/sofia_sla.c

index db03cc1d949886c45bfe755d866d86937a9be754..4b0b1ba05cde0ae34959438901f8b8c083c82275 100644 (file)
@@ -3173,7 +3173,9 @@ int sofia_glue_init_sql(sofia_profile_t *profile)
                        free(test_sql);
 
                        switch_core_db_exec(profile->master_db, "create index if not exists ssa_hostname on sip_shared_appearance_subscriptions (hostname)", NULL, NULL, NULL);
-                       /* XXX MTK create additional index for shared_appearance if necessary */
+                       switch_core_db_exec(profile->master_db, "create index if not exists ssa_subscriber on sip_shared_appearance_subscriptions (subscriber)", NULL, NULL, NULL);
+                       switch_core_db_exec(profile->master_db, "create index if not exists ssa_profile_name on sip_shared_appearance_subscriptions (profile_name)", NULL, NULL, NULL);
+                       switch_core_db_exec(profile->master_db, "create index if not exists ssa_aor on sip_shared_appearance_subscriptions (aor)", NULL, NULL, NULL);
                }
 
 
index 13aba0ecac25aa92beabc76b6b40b614b22b4179..07d9cc4ca4977ea749bd13d297065bfda9ec0bf5 100644 (file)
@@ -113,7 +113,7 @@ void sofia_sla_handle_sip_i_subscribe(nua_t *nua, const char *contact_str, sofia
  
 
        if ((sql =
-               switch_mprintf("delete from sip_shared_appearance_subscriptions where subscriber='%q' and profile name='%q' and hostname='%q'",
+               switch_mprintf("delete from sip_shared_appearance_subscriptions where subscriber='%q' and profile_name='%q' and hostname='%q'",
                        subscriber, profile->name, mod_sofia_globals.hostname
                        ))) {
                sofia_glue_execute_sql(profile, &sql, SWITCH_TRUE);