[Asterisk-code-review] res ari: Fix inverted test giving wrong error message. (asterisk[master])
Richard Mudgett
asteriskteam at digium.com
Sun Nov 26 09:47:43 CST 2017
Richard Mudgett has uploaded this change for review. ( https://gerrit.asterisk.org/7369
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-24560
Change-Id: I4b70bf08b0e02e016108b077ff75b345dec12fc9
---
M res/ari/resource_bridges.c
1 file changed, 6 insertions(+), 7 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/69/7369/1
diff --git a/res/ari/resource_bridges.c b/res/ari/resource_bridges.c
index cd289aa..a320c29 100644
--- a/res/ari/resource_bridges.c
+++ b/res/ari/resource_bridges.c
@@ -968,13 +968,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/7369
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4b70bf08b0e02e016108b077ff75b345dec12fc9
Gerrit-Change-Number: 7369
Gerrit-PatchSet: 1
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171126/edb727cc/attachment.html>
More information about the asterisk-code-review
mailing list