put blank, not printf'd null into the module load sql statements.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4376 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2007-02-23 20:13:15 +00:00
parent f69b1aefb6
commit 1109bc83c7
1 changed files with 14 additions and 6 deletions

View File

@ -4118,13 +4118,21 @@ static void core_event_handler(switch_event_t *event)
case SWITCH_EVENT_LOG:
return;
case SWITCH_EVENT_MODULE_LOAD:
{
const char *type = switch_event_get_header(event, "type");
const char *name = switch_event_get_header(event, "name");
const char *description = switch_event_get_header(event, "description");
const char *syntax = switch_event_get_header(event, "syntax");
if(!switch_strlen_zero(type) && !switch_strlen_zero(name)) {
sql = switch_mprintf("insert into interfaces (type,name,description,syntax) values('%q','%q','%q','%q')",
switch_event_get_header(event, "type"),
switch_event_get_header(event, "name"),
switch_event_get_header(event, "description"),
switch_event_get_header(event, "syntax")
type,
name,
switch_str_nil(description),
switch_str_nil(syntax)
);
}
break;
}
default:
break;
}