[Freeswitch-svn] [commit] r9351 - freeswitch/trunk/src

Freeswitch SVN anthm at freeswitch.org
Fri Aug 22 13:18:26 EDT 2008


Author: anthm
Date: Fri Aug 22 13:18:26 2008
New Revision: 9351

Modified:
   freeswitch/trunk/src/switch_core_sqldb.c

Log:
remove stuff from the db on unload

Modified: freeswitch/trunk/src/switch_core_sqldb.c
==============================================================================
--- freeswitch/trunk/src/switch_core_sqldb.c	(original)
+++ freeswitch/trunk/src/switch_core_sqldb.c	Fri Aug 22 13:18:26 2008
@@ -355,6 +355,15 @@
 			}
 			break;
 		}
+	case SWITCH_EVENT_MODULE_UNLOAD:
+		{
+			const char *type = switch_event_get_header_nil(event, "type");
+			const char *name = switch_event_get_header_nil(event, "name");
+			if (!switch_strlen_zero(type) && !switch_strlen_zero(name)) {
+				sql = switch_mprintf("delete from interfaces where type='%q' and name='%q'", type, name);
+			}
+			break;
+		}
 	default:
 		break;
 	}



More information about the Freeswitch-svn mailing list