git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@202 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2005-12-23 16:54:49 +00:00
parent 1e8b78dc6b
commit 9e6a90602d
3 changed files with 15 additions and 9 deletions

View File

@ -127,7 +127,7 @@ void playback_function(switch_core_session *session, char *data)
}
write_frame.datalen = ilen;
#ifdef BIGENDIAN
#ifdef SWAP_LINEAR
switch_swap_linear(write_frame.data, (int)write_frame.datalen / 2);
#endif
if (switch_core_session_write_frame(session, &write_frame, -1) != SWITCH_STATUS_SUCCESS) {

View File

@ -119,14 +119,14 @@ SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_jid, globals.jid)
}
switch_config_close_file(&cfg);
/* TBD use config to pick what events to bind to */
if (switch_event_bind((char *)modname, SWITCH_EVENT_ALL, SWITCH_EVENT_SUBCLASS_ANY, event_handler, NULL) != SWITCH_STATUS_SUCCESS) {
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Couldn't bind!\n");
return SWITCH_STATUS_GENERR;
}
if (count == 3) {
/* TBD use config to pick what events to bind to */
if (switch_event_bind((char *)modname, SWITCH_EVENT_ALL, SWITCH_EVENT_SUBCLASS_ANY, event_handler, NULL) != SWITCH_STATUS_SUCCESS) {
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Couldn't bind!\n");
return SWITCH_STATUS_GENERR;
}
status = SWITCH_STATUS_SUCCESS;
}

View File

@ -66,7 +66,13 @@ char *arg = NULL;
return 1;
}
#endif
if ((arg = strchr(cmd, '\r')) || (arg=strchr(cmd, '\n'))) {
*arg = '\0';
arg = NULL;
}
if ((arg = strchr(cmd, ' '))) {
*arg++ = '\0';
}
if (switch_api_execute(cmd, arg, retbuf, sizeof(retbuf)) == SWITCH_STATUS_SUCCESS) {
switch_console_printf(SWITCH_CHANNEL_CONSOLE_CLEAN, "API CALL [%s(%s)] output:\n%s\n", cmd, arg ? arg : "", retbuf);
} else {