[svn-commits] mjordan: trunk r421313 - in /trunk: ./ res/ari/resource_channels.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sun Aug 17 20:14:54 CDT 2014


Author: mjordan
Date: Sun Aug 17 20:14:51 2014
New Revision: 421313

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=421313
Log:
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.
........
  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

Modified:
    trunk/   (props changed)
    trunk/res/ari/resource_channels.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-13-merged' - no diff available.

Modified: trunk/res/ari/resource_channels.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/ari/resource_channels.c?view=diff&rev=421313&r1=421312&r2=421313
==============================================================================
--- trunk/res/ari/resource_channels.c (original)
+++ trunk/res/ari/resource_channels.c Sun Aug 17 20:14:51 2014
@@ -964,7 +964,9 @@
 
 	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 {




More information about the svn-commits mailing list