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
This commit is contained in:
Michael Jerris 2006-12-22 18:39:36 +00:00
parent 9bf1884d47
commit 47343dcb87
2 changed files with 4 additions and 2 deletions

View File

@ -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");
}

View File

@ -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;