]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
return +OK on success
authorSeven Du <dujinfang@gmail.com>
Sat, 4 Jan 2014 08:53:36 +0000 (16:53 +0800)
committerSeven Du <dujinfang@gmail.com>
Sat, 4 Jan 2014 08:53:46 +0000 (16:53 +0800)
src/mod/applications/mod_commands/mod_commands.c

index be2d36cb4ffbf460e382d485a4589c28e306dacf..2b21821ccc3e0966457188dddb2b5bec17b1de3b 100644 (file)
@@ -3187,8 +3187,13 @@ SWITCH_STANDARD_API(uuid_answer_function)
 
        if (uuid && (xsession = switch_core_session_locate(uuid))) {
                switch_channel_t *channel = switch_core_session_get_channel(xsession);
-               switch_channel_answer(channel);
+               switch_status_t status = switch_channel_answer(channel);
                switch_core_session_rwunlock(xsession);
+               if (status == SWITCH_STATUS_SUCCESS) {
+                       stream->write_function(stream, "+OK\n");
+               } else {
+                       stream->write_function(stream, "-ERROR\n");
+               }
        } else {
                stream->write_function(stream, "-ERROR\n");
        }