<p>Friendly Automation <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/19733">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span></span><br></pre><div style="white-space:pre-wrap">Approvals:
  George Joseph: Looks good to me, approved
  Friendly Automation: Approved for Submit

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">pbx_app: Update outdated pbx_exec channel snapshots.<br><br>pbx_exec makes a channel snapshot before executing applications.<br>This doesn't cause an issue during normal dialplan execution<br>where pbx_exec is called over and over again in succession.<br>However, if pbx_exec is called "one off", e.g. using<br>ast_pbx_exec_application, then a channel snapshot never ends<br>up getting made after the executed application returns, and<br>inaccurate snapshot information will linger for a while, causing<br>"core show channels", etc. to show erroneous info.<br><br>This is fixed by manually making a channel snapshot at the end<br>of ast_pbx_exec_application, since we anticipate that pbx_exec<br>might not get called again immediately.<br><br>ASTERISK-30367 #close<br><br>Change-Id: I2a5131053aa9d11badbc0ef2ef40b1f83d0af086<br>---<br>M main/pbx_app.c<br>1 file changed, 26 insertions(+), 0 deletions(-)<br><br></pre>
<pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/main/pbx_app.c b/main/pbx_app.c</span><br><span>index 5879d73..6726a90 100644</span><br><span>--- a/main/pbx_app.c</span><br><span>+++ b/main/pbx_app.c</span><br><span>@@ -519,6 +519,8 @@</span><br><span>                   }</span><br><span>                    res = pbx_exec(chan, app, app_args);</span><br><span>                 }</span><br><span style="color: hsl(120, 100%, 40%);">+             /* Manually make a snapshot now, since pbx_exec won't necessarily get called again immediately. */</span><br><span style="color: hsl(120, 100%, 40%);">+                ast_channel_publish_snapshot(chan);</span><br><span>  }</span><br><span>    return res;</span><br><span> }</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/19733">change 19733</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/+/19733"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 20 </div>
<div style="display:none"> Gerrit-Change-Id: I2a5131053aa9d11badbc0ef2ef40b1f83d0af086 </div>
<div style="display:none"> Gerrit-Change-Number: 19733 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: N A <asterisk@phreaknet.org> </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-MessageType: merged </div>