<p>Joshua C. Colp <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/11143">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Corey Farrell: Looks good to me, but someone else must approve
Sean Bright: Looks good to me, but someone else must approve
Kevin Harwell: Looks good to me, approved
Joshua C. Colp: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">stasis: Allow empty application arguments to move.<br><br>Change-Id: I1e4d37415f3034abe36496dc30209c2303e6af5c<br>---<br>M res/stasis/control.c<br>1 file changed, 8 insertions(+), 3 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/stasis/control.c b/res/stasis/control.c</span><br><span>index 05f2fd3..4e2490d 100644</span><br><span>--- a/res/stasis/control.c</span><br><span>+++ b/res/stasis/control.c</span><br><span>@@ -525,16 +525,21 @@</span><br><span> struct stasis_app_control_move_data *move_data;</span><br><span> size_t size;</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- size = sizeof(*move_data) + strlen(app_name) + strlen(app_args) + 2;</span><br><span style="color: hsl(120, 100%, 40%);">+ size = sizeof(*move_data) + strlen(app_name) + 1;</span><br><span style="color: hsl(120, 100%, 40%);">+ if (app_args) {</span><br><span style="color: hsl(120, 100%, 40%);">+ /* Application arguments are optional */</span><br><span style="color: hsl(120, 100%, 40%);">+ size += strlen(app_args) + 1;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> if (!(move_data = ast_calloc(1, size))) {</span><br><span> return -1;</span><br><span> }</span><br><span> </span><br><span> move_data->app_name = (char *)move_data + sizeof(*move_data);</span><br><span style="color: hsl(0, 100%, 40%);">- move_data->app_args = move_data->app_name + strlen(app_name) + 1;</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span> strcpy(move_data->app_name, app_name); /* Safe */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> if (app_args) {</span><br><span style="color: hsl(120, 100%, 40%);">+ move_data->app_args = move_data->app_name + strlen(app_name) + 1;</span><br><span> strcpy(move_data->app_args, app_args); /* Safe */</span><br><span> } else {</span><br><span> move_data->app_args = NULL;</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/11143">change 11143</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/+/11143"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-Change-Id: I1e4d37415f3034abe36496dc30209c2303e6af5c </div>
<div style="display:none"> Gerrit-Change-Number: 11143 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Joshua C. Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: Joshua C. Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Sean Bright <sean.bright@gmail.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>