fix segfault on invalid usage

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10846 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2008-12-17 04:29:48 +00:00
parent 754fe072a4
commit e671a70371
1 changed files with 3 additions and 0 deletions

View File

@ -439,6 +439,9 @@ SWITCH_STANDARD_APP(db_function)
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);