[asterisk-commits] file: trunk r400402 - in /trunk: ./ res/ari/resource_channels.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Oct 3 14:06:49 CDT 2013
Author: file
Date: Thu Oct 3 14:06:48 2013
New Revision: 400402
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=400402
Log:
Fix a crash caused by muting and unmuting a channel in ARI without specifying a direction.
(closes issue ASTERISK-22637)
Reported by: Scott Griepentrog
Patch by Matt Jordan, whose office I have taken over in the name of Canada.
........
Merged revisions 400401 from http://svn.asterisk.org/svn/asterisk/branches/12
Modified:
trunk/ (props changed)
trunk/res/ari/resource_channels.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-12-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=400402&r1=400401&r2=400402
==============================================================================
--- trunk/res/ari/resource_channels.c (original)
+++ trunk/res/ari/resource_channels.c Thu Oct 3 14:06:48 2013
@@ -152,6 +152,13 @@
return;
}
+ if (ast_strlen_zero(args->direction)) {
+ ast_ari_response_error(
+ response, 400, "Bad Request",
+ "Direction is required");
+ return;
+ }
+
if (!strcmp(args->direction, "in")) {
direction = AST_MUTE_DIRECTION_READ;
} else if (!strcmp(args->direction, "out")) {
@@ -178,6 +185,13 @@
control = find_control(response, args->channel_id);
if (control == NULL) {
+ return;
+ }
+
+ if (ast_strlen_zero(args->direction)) {
+ ast_ari_response_error(
+ response, 400, "Bad Request",
+ "Direction is required");
return;
}
More information about the asterisk-commits
mailing list