[asterisk-commits] res ari: Cannot get control also means channel is unavailable. (asterisk[master])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Mar 30 20:59:06 CDT 2016


Joshua Colp has submitted this change and it was merged.

Change subject: res_ari: Cannot get control also means channel is unavailable.
......................................................................


res_ari: Cannot get control also means channel is unavailable.

The only caller of ari_bridges_play_found() has this note:

If ari_bridges_play_found fails because the channel is unavailable for
playback, The channel will be removed from the playback list soon.  We can
keep trying to get channels from the list until we either get one that
will work or else there isn't a channel for this bridge anymore, in which
case we'll revert to ari_bridges_play_new.

Change-Id: Ib068141b367ccaa17be0dab4181c98e26c5127d6
---
M res/ari/resource_bridges.c
1 file changed, 1 insertion(+), 3 deletions(-)

Approvals:
  Matt Jordan: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, approved; Verified



diff --git a/res/ari/resource_bridges.c b/res/ari/resource_bridges.c
index 7b9b946..759947a 100644
--- a/res/ari/resource_bridges.c
+++ b/res/ari/resource_bridges.c
@@ -526,9 +526,7 @@
 
 	control = stasis_app_control_find_by_channel(play_channel);
 	if (!control) {
-		ast_ari_response_error(
-			response, 500, "Internal Error", "Failed to get control snapshot");
-		return PLAY_FOUND_FAILURE;
+		return PLAY_FOUND_CHANNEL_UNAVAILABLE;
 	}
 
 	ao2_lock(control);

-- 
To view, visit https://gerrit.asterisk.org/2505
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib068141b367ccaa17be0dab4181c98e26c5127d6
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>



More information about the asterisk-commits mailing list