summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Jordan <mjordan@digium.com>2014-08-18 01:14:51 +0000
committerMatthew Jordan <mjordan@digium.com>2014-08-18 01:14:51 +0000
commitbb494067a5c670da20fc9a7f20fcdf3d408d30b8 (patch)
tree337130a1e3361bf6a75bb3ecc14b32944a71d570
parentba5d5da60b80b1d639e06d02d7692692281d6063 (diff)
Multiple revisions 421311-421312
........ r421311 | mjordan | 2014-08-17 20:11:28 -0500 (Sun, 17 Aug 2014) | 9 lines res/ari/resource_channels: Don't return allocation failure on failed function If a function fails to execute, it is most likely due to one of two reasons: (1) The function doesn't exist or can't be read from (2) The function is dangerous and is restricted based on the user's permissions Currently we return allocation failure, which is incorrect. This updates the reason code to more accurately reflect why the request failed. ASTERISK-24215 ........ r421312 | mjordan | 2014-08-17 20:13:41 -0500 (Sun, 17 Aug 2014) | 4 lines res/ari/resource_channels: Fix compilation issue Forgot a parameter. Whoops. ........ Merged revisions 421311-421312 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@421313 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--res/ari/resource_channels.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/res/ari/resource_channels.c b/res/ari/resource_channels.c
index 0ac53dd73..112607db6 100644
--- a/res/ari/resource_channels.c
+++ b/res/ari/resource_channels.c
@@ -964,7 +964,9 @@ void ast_ari_channels_get_channel_var(struct ast_variable *headers,
if (args->variable[strlen(args->variable) - 1] == ')') {
if (ast_func_read2(channel, args->variable, &value, 0)) {
- ast_ari_response_alloc_failed(response);
+ ast_ari_response_error(
+ response, 500, "Error With Function",
+ "Unable to read provided function");
return;
}
} else {