<p>Joshua Colp <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/14279">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Joshua Colp: Looks good to me, but someone else must approve; Approved for Submit
Kevin Harwell: Looks good to me, approved
Richard Mudgett: Looks good to me, but someone else must approve
George Joseph: Looks good to me, but someone else must approve
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_ari_channels: Fixed endpoint 80 characters limit<br><br>Fixed it to copy the entire string from the requested endpoint body except tech-prefix.<br><br>ASTERISK-28847<br><br>Change-Id: I91b5f6708a1200363f3267b847dd6a0915222c25<br>---<br>M res/ari/resource_channels.c<br>1 file changed, 11 insertions(+), 4 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/ari/resource_channels.c b/res/ari/resource_channels.c</span><br><span>index 549883d..eaff90f 100644</span><br><span>--- a/res/ari/resource_channels.c</span><br><span>+++ b/res/ari/resource_channels.c</span><br><span>@@ -1077,7 +1077,7 @@</span><br><span> struct ast_ari_response *response)</span><br><span> {</span><br><span> char *dialtech;</span><br><span style="color: hsl(0, 100%, 40%);">- char dialdevice[AST_CHANNEL_NAME];</span><br><span style="color: hsl(120, 100%, 40%);">+ char *dialdevice = NULL;</span><br><span> struct ast_dial *dial;</span><br><span> char *caller_id = NULL;</span><br><span> char *cid_num = NULL;</span><br><span>@@ -1116,7 +1116,7 @@</span><br><span> dialtech = ast_strdupa(args_endpoint);</span><br><span> if ((stuff = strchr(dialtech, '/'))) {</span><br><span> *stuff++ = '\0';</span><br><span style="color: hsl(0, 100%, 40%);">- ast_copy_string(dialdevice, stuff, sizeof(dialdevice));</span><br><span style="color: hsl(120, 100%, 40%);">+ dialdevice = stuff;</span><br><span> }</span><br><span> </span><br><span> if (ast_strlen_zero(dialtech) || ast_strlen_zero(dialdevice)) {</span><br><span>@@ -1787,7 +1787,7 @@</span><br><span> struct ast_channel_snapshot *snapshot;</span><br><span> pthread_t thread;</span><br><span> char *dialtech;</span><br><span style="color: hsl(0, 100%, 40%);">- char dialdevice[AST_CHANNEL_NAME];</span><br><span style="color: hsl(120, 100%, 40%);">+ char *dialdevice = NULL;</span><br><span> char *stuff;</span><br><span> int cause;</span><br><span> struct ast_format_cap *request_cap;</span><br><span>@@ -1826,7 +1826,14 @@</span><br><span> dialtech = ast_strdupa(args->endpoint);</span><br><span> if ((stuff = strchr(dialtech, '/'))) {</span><br><span> *stuff++ = '\0';</span><br><span style="color: hsl(0, 100%, 40%);">- ast_copy_string(dialdevice, stuff, sizeof(dialdevice));</span><br><span style="color: hsl(120, 100%, 40%);">+ dialdevice = stuff;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ if (ast_strlen_zero(dialtech) || ast_strlen_zero(dialdevice)) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_ari_response_error(response, 400, "Bad Request",</span><br><span style="color: hsl(120, 100%, 40%);">+ "Invalid endpoint specified");</span><br><span style="color: hsl(120, 100%, 40%);">+ chan_data_destroy(chan_data);</span><br><span style="color: hsl(120, 100%, 40%);">+ return;</span><br><span> }</span><br><span> </span><br><span> originator = ast_channel_get_by_name(args->originator);</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/14279">change 14279</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/14279"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I91b5f6708a1200363f3267b847dd6a0915222c25 </div>
<div style="display:none"> Gerrit-Change-Number: 14279 </div>
<div style="display:none"> Gerrit-PatchSet: 4 </div>
<div style="display:none"> Gerrit-Owner: sungtae kim <pchero21@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Richard Mudgett <rmudgett@digium.com> </div>
<div style="display:none"> Gerrit-CC: Sean Bright <sean.bright@gmail.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>