]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
improve skinny behavior in HA deployment
authorNathan Neulinger <nneul@neulinger.org>
Thu, 27 Jun 2013 02:56:10 +0000 (21:56 -0500)
committerNathan Neulinger <nneul@neulinger.org>
Thu, 27 Jun 2013 02:56:10 +0000 (21:56 -0500)
src/mod/endpoints/mod_skinny/mod_skinny.c

index 7dff9b7209997e4bd4975a2c1bd5a7670f157651..f5c01481d4d155209bfc3aa40938e3f0c84f444e 100644 (file)
@@ -1995,10 +1995,10 @@ static switch_status_t load_skinny_config(void)
                                
                                
                                if ((dbh = skinny_get_db_handle(profile))) {
-                                       switch_cache_db_test_reactive(dbh, "DELETE FROM skinny_devices", "DROP TABLE skinny_devices", devices_sql);
-                                       switch_cache_db_test_reactive(dbh, "DELETE FROM skinny_lines", "DROP TABLE skinny_lines", lines_sql);
-                                       switch_cache_db_test_reactive(dbh, "DELETE FROM skinny_buttons", "DROP TABLE skinny_buttons", buttons_sql);
-                                       switch_cache_db_test_reactive(dbh, "DELETE FROM skinny_active_lines", "DROP TABLE skinny_active_lines", active_lines_sql);
+                                       switch_cache_db_test_reactive(dbh, "select count(*) from skinny_devices", NULL, devices_sql);
+                                       switch_cache_db_test_reactive(dbh, "select count(*) from skinny_lines", NULL, lines_sql);
+                                       switch_cache_db_test_reactive(dbh, "select count(*) from skinny_buttons", NULL, buttons_sql);
+                                       switch_cache_db_test_reactive(dbh, "select count(*) from skinny_active_lines", NULL, active_lines_sql);
                                        switch_cache_db_release_db_handle(&dbh);
                                }