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
This commit is contained in:
Richard Mudgett
2017-11-26 09:44:51 -06:00
parent 16381e54e4
commit 55c4d8e008

View File

@@ -968,13 +968,12 @@ void ast_ari_bridges_create_with_id(struct ast_variable *headers,
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(