From 47343dcb874a3ae6aa666b8f33c492ff2532552c Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Fri, 22 Dec 2006 18:39:36 +0000 Subject: [PATCH] api commands should not return false unless there is a fatal error warnings about no such command etc still considered sucess cos it has io git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3796 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/applications/mod_conference/mod_conference.c | 2 +- src/mod/event_handlers/mod_event_socket/mod_event_socket.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mod/applications/mod_conference/mod_conference.c b/src/mod/applications/mod_conference/mod_conference.c index 0c007a1679..e200179be3 100644 --- a/src/mod/applications/mod_conference/mod_conference.c +++ b/src/mod/applications/mod_conference/mod_conference.c @@ -3153,7 +3153,7 @@ static switch_status_t conf_api_main(char *buf, switch_core_session_t *session, } if (argc >= 2) { - status = conf_api_dispatch(conference, stream, argc, argv, (const char *)buf, 1); + conf_api_dispatch(conference, stream, argc, argv, (const char *)buf, 1); } else { stream->write_function(stream, "Conference command, not specified.\nTry 'help'\n"); } diff --git a/src/mod/event_handlers/mod_event_socket/mod_event_socket.c b/src/mod/event_handlers/mod_event_socket/mod_event_socket.c index 550b45cf28..02b661103f 100644 --- a/src/mod/event_handlers/mod_event_socket/mod_event_socket.c +++ b/src/mod/event_handlers/mod_event_socket/mod_event_socket.c @@ -415,7 +415,9 @@ static void *SWITCH_THREAD_FUNC api_exec(switch_thread_t *thread, void *obj) if (stream.data) { if (switch_api_execute(acs->api_cmd, acs->arg, NULL, &stream) == SWITCH_STATUS_SUCCESS) { - + if (!stream.data) { + stream.write_function(&stream, "Command returned no output!\n"); + } if (acs->bg) { switch_event_t *event;