[Asterisk-code-review] res_ari: Fix create channel request channelId parameter parsing (asterisk[17.5])
Kevin Harwell
asteriskteam at digium.com
Tue Jun 16 09:27:28 CDT 2020
Kevin Harwell has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/14555 )
Change subject: res_ari: Fix create channel request channelId parameter parsing
......................................................................
res_ari: Fix create channel request channelId parameter parsing
If channelId parameters were passed in the body, the Asterisk doesn't parsing it correctly.
Fixed it to parse the channelId, other_channel_id parameter correclty.
ASTERISK-28948
Change-Id: I59b49161a94869169ee19c1ffab5afcef7026157
(cherry picked from commit 37f8adacd16f46f87bb48248f6b2908f044edb36)
---
M res/ari/resource_channels.c
1 file changed, 4 insertions(+), 4 deletions(-)
Approvals:
George Joseph: Looks good to me, approved
Kevin Harwell: Approved for Submit
diff --git a/res/ari/resource_channels.c b/res/ari/resource_channels.c
index 680d777..8c8a1eb 100644
--- a/res/ari/resource_channels.c
+++ b/res/ari/resource_channels.c
@@ -1780,10 +1780,7 @@
struct ast_ari_response *response)
{
struct ast_variable *variables = NULL;
- struct ast_assigned_ids assignedids = {
- .uniqueid = args->channel_id,
- .uniqueid2 = args->other_channel_id,
- };
+ struct ast_assigned_ids assignedids;
struct ari_channel_thread_data *chan_data;
struct ast_channel_snapshot *snapshot;
pthread_t thread;
@@ -1806,6 +1803,9 @@
}
}
+ assignedids.uniqueid = args->channel_id;
+ assignedids.uniqueid2 = args->other_channel_id;
+
if (!ast_strlen_zero(args->originator) && !ast_strlen_zero(args->formats)) {
ast_ari_response_error(response, 400, "Bad Request",
"Originator and formats can't both be specified");
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/14555
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 17.5
Gerrit-Change-Id: I59b49161a94869169ee19c1ffab5afcef7026157
Gerrit-Change-Number: 14555
Gerrit-PatchSet: 1
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: sungtae kim <pchero21 at gmail.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200616/716fed55/attachment-0001.html>
More information about the asterisk-code-review
mailing list