[Asterisk-code-review] res ari: Fix inverted test giving wrong error message. (asterisk[13])
Joshua Colp
asteriskteam at digium.com
Mon Nov 27 16:55:57 CST 2017
Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/7367 )
Change subject: res_ari: Fix inverted test giving wrong error message.
......................................................................
res_ari: Fix inverted test giving wrong error message.
The patch for ASTERISK_24560 inverted a test checking if the bridge name
is being updated to a different name.
* Fix the test to return "Changing bridge name is not implemented" when
someone attempts to change the bridge name.
ASTERISK-27445
Change-Id: I4b70bf08b0e02e016108b077ff75b345dec12fc9
---
M res/ari/resource_bridges.c
1 file changed, 6 insertions(+), 7 deletions(-)
Approvals:
Joshua Colp: Looks good to me, but someone else must approve; Approved for Submit
George Joseph: Looks good to me, but someone else must approve
Sean Bright: Looks good to me, approved
diff --git a/res/ari/resource_bridges.c b/res/ari/resource_bridges.c
index d6a0400..643cc30 100644
--- a/res/ari/resource_bridges.c
+++ b/res/ari/resource_bridges.c
@@ -957,13 +957,12 @@
if (bridge) {
/* update */
- if (!ast_strlen_zero(args->name)) {
- if (!strcmp(args->name, bridge->name)) {
- ast_ari_response_error(
- response, 500, "Internal Error",
- "Changing bridge name is not implemented");
- return;
- }
+ if (!ast_strlen_zero(args->name)
+ && strcmp(args->name, bridge->name)) {
+ ast_ari_response_error(
+ response, 500, "Internal Error",
+ "Changing bridge name is not implemented");
+ return;
}
if (!ast_strlen_zero(args->type)) {
ast_ari_response_error(
--
To view, visit https://gerrit.asterisk.org/7367
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: merged
Gerrit-Change-Id: I4b70bf08b0e02e016108b077ff75b345dec12fc9
Gerrit-Change-Number: 7367
Gerrit-PatchSet: 2
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Sean Bright <sean.bright at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171127/62cc53f3/attachment.html>
More information about the asterisk-code-review
mailing list