diff --git a/src/mod/mod_playback/mod_playback.c b/src/mod/mod_playback/mod_playback.c index 287c36f1e8..76c8b3d1a7 100644 --- a/src/mod/mod_playback/mod_playback.c +++ b/src/mod/mod_playback/mod_playback.c @@ -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) { diff --git a/src/mod/mod_xmpp_event/mod_xmpp_event.c b/src/mod/mod_xmpp_event/mod_xmpp_event.c index 6056cd34ca..03ab8d5ff8 100644 --- a/src/mod/mod_xmpp_event/mod_xmpp_event.c +++ b/src/mod/mod_xmpp_event/mod_xmpp_event.c @@ -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; } diff --git a/src/switch_console.c b/src/switch_console.c index 4f9d974faa..be7d8560e5 100644 --- a/src/switch_console.c +++ b/src/switch_console.c @@ -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 {