]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add expires to sip_dialogs test for dropping table
authorRupa Schomaker <rupa@rupa.com>
Thu, 11 Feb 2010 18:54:17 +0000 (18:54 +0000)
committerRupa Schomaker <rupa@rupa.com>
Thu, 11 Feb 2010 18:54:17 +0000 (18:54 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16606 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/sofia_glue.c

index 3dc3f6f022b586cbd40a68715e256e165d631238..2c390d7a324c31fad9f3b7829b4797c6f74772d9 100644 (file)
@@ -4469,7 +4469,7 @@ int sofia_glue_init_sql(sofia_profile_t *profile)
                }
 
                free(test_sql);
-               test_sql = switch_mprintf("delete from sip_dialogs where hostname='%q'", mod_sofia_globals.hostname);
+               test_sql = switch_mprintf("delete from sip_dialogs where hostname='%q' and expires <> -9999", mod_sofia_globals.hostname);
 
                if (switch_odbc_handle_exec(odbc_dbh, test_sql, NULL, NULL) != SWITCH_ODBC_SUCCESS) {
                        switch_odbc_handle_exec(odbc_dbh, "DROP TABLE sip_dialogs", NULL, NULL);
@@ -4549,7 +4549,7 @@ int sofia_glue_init_sql(sofia_profile_t *profile)
                switch_core_db_test_reactive(db, test_sql, "DROP TABLE sip_subscriptions", sub_sql);
                free(test_sql);
 
-               test_sql = switch_mprintf("delete from sip_dialogs where hostname='%q'", mod_sofia_globals.hostname);
+               test_sql = switch_mprintf("delete from sip_dialogs where hostname='%q' and expires <> -9999", mod_sofia_globals.hostname);
                switch_core_db_test_reactive(db, test_sql, "DROP TABLE sip_dialogs", dialog_sql);
                free(test_sql);