Revision
16606
Author
rupa
Date
2010-02-11 12:54:17 -0600 (Thu, 11 Feb 2010)

Log Message

add expires to sip_dialogs test for dropping table

Modified Paths

Diff

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c (16605 => 16606)


--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c	2010-02-11 17:32:22 UTC (rev 16605)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c	2010-02-11 18:54:17 UTC (rev 16606)
@@ -4469,7 +4469,7 @@
 		}
 
 		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 @@
 		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);