[Asterisk-code-review] res_ari_channels: Fixed endpoint 80 characters limit (asterisk[master])

sungtae kim asteriskteam at digium.com
Tue Apr 21 10:44:57 CDT 2020


sungtae kim has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/14279 )


Change subject: res_ari_channels: Fixed endpoint 80 characters limit
......................................................................

res_ari_channels: Fixed endpoint 80 characters limit

Fixed it to copy the entire string from the requested ednpoint body except tech-prefix.

ASTERISK-28847

Change-Id: I91b5f6708a1200363f3267b847dd6a0915222c25
---
M res/ari/resource_channels.c
1 file changed, 4 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/79/14279/1

diff --git a/res/ari/resource_channels.c b/res/ari/resource_channels.c
index 549883d..9a3d41b 100644
--- a/res/ari/resource_channels.c
+++ b/res/ari/resource_channels.c
@@ -1077,7 +1077,7 @@
 	struct ast_ari_response *response)
 {
 	char *dialtech;
-	char dialdevice[AST_CHANNEL_NAME];
+	char *dialdevice = NULL;
 	struct ast_dial *dial;
 	char *caller_id = NULL;
 	char *cid_num = NULL;
@@ -1116,7 +1116,7 @@
 	dialtech = ast_strdupa(args_endpoint);
 	if ((stuff = strchr(dialtech, '/'))) {
 		*stuff++ = '\0';
-		ast_copy_string(dialdevice, stuff, sizeof(dialdevice));
+		dialdevice = ast_strdupa(stuff);
 	}
 
 	if (ast_strlen_zero(dialtech) || ast_strlen_zero(dialdevice)) {
@@ -1787,7 +1787,7 @@
 	struct ast_channel_snapshot *snapshot;
 	pthread_t thread;
 	char *dialtech;
-	char dialdevice[AST_CHANNEL_NAME];
+	char *dialdevice = NULL;
 	char *stuff;
 	int cause;
 	struct ast_format_cap *request_cap;
@@ -1826,7 +1826,7 @@
 	dialtech = ast_strdupa(args->endpoint);
 	if ((stuff = strchr(dialtech, '/'))) {
 		*stuff++ = '\0';
-		ast_copy_string(dialdevice, stuff, sizeof(dialdevice));
+		dialdevice = ast_strdupa(stuff);
 	}
 
 	originator = ast_channel_get_by_name(args->originator);

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/14279
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I91b5f6708a1200363f3267b847dd6a0915222c25
Gerrit-Change-Number: 14279
Gerrit-PatchSet: 1
Gerrit-Owner: sungtae kim <pchero21 at gmail.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200421/b5ab6237/attachment.html>


More information about the asterisk-code-review mailing list