[Freeswitch-svn] [commit] r10846 - freeswitch/trunk/src/mod/applications/mod_limit

FreeSWITCH SVN mikej at freeswitch.org
Tue Dec 16 20:29:48 PST 2008


Author: mikej
Date: Tue Dec 16 23:29:48 2008
New Revision: 10846

Log:
fix segfault on invalid usage

Modified:
   freeswitch/trunk/src/mod/applications/mod_limit/mod_limit.c

Modified: freeswitch/trunk/src/mod/applications/mod_limit/mod_limit.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_limit/mod_limit.c	(original)
+++ freeswitch/trunk/src/mod/applications/mod_limit/mod_limit.c	Tue Dec 16 23:29:48 2008
@@ -439,6 +439,9 @@
 						   argv[3]);
 	} else if (!strcasecmp(argv[0], "delete")) {
 		sql = switch_mprintf("delete from db_data where realm='%q' and data_key='%q'", argv[1], argv[2]);
+	} else {
+		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "USAGE: db %s\n", DB_USAGE);
+		return;
 	}
 
 	switch_assert(sql);



More information about the Freeswitch-svn mailing list