[Asterisk-code-review] pbx_app: Update outdated pbx_exec channel snapshots. (asterisk[18])
George Joseph
asteriskteam at digium.com
Tue Jan 3 07:55:46 CST 2023
George Joseph has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/19732 )
Change subject: pbx_app: Update outdated pbx_exec channel snapshots.
......................................................................
pbx_app: Update outdated pbx_exec channel snapshots.
pbx_exec makes a channel snapshot before executing applications.
This doesn't cause an issue during normal dialplan execution
where pbx_exec is called over and over again in succession.
However, if pbx_exec is called "one off", e.g. using
ast_pbx_exec_application, then a channel snapshot never ends
up getting made after the executed application returns, and
inaccurate snapshot information will linger for a while, causing
"core show channels", etc. to show erroneous info.
This is fixed by manually making a channel snapshot at the end
of ast_pbx_exec_application, since we anticipate that pbx_exec
might not get called again immediately.
ASTERISK-30367 #close
Change-Id: I2a5131053aa9d11badbc0ef2ef40b1f83d0af086
---
M main/pbx_app.c
1 file changed, 26 insertions(+), 0 deletions(-)
Approvals:
George Joseph: Looks good to me, approved; Approved for Submit
diff --git a/main/pbx_app.c b/main/pbx_app.c
index 5879d73..6726a90 100644
--- a/main/pbx_app.c
+++ b/main/pbx_app.c
@@ -519,6 +519,8 @@
}
res = pbx_exec(chan, app, app_args);
}
+ /* Manually make a snapshot now, since pbx_exec won't necessarily get called again immediately. */
+ ast_channel_publish_snapshot(chan);
}
return res;
}
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/19732
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 18
Gerrit-Change-Id: I2a5131053aa9d11badbc0ef2ef40b1f83d0af086
Gerrit-Change-Number: 19732
Gerrit-PatchSet: 2
Gerrit-Owner: N A <asterisk at phreaknet.org>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20230103/7ecf6f58/attachment.html>
More information about the asterisk-code-review
mailing list