[Asterisk-code-review] app_queue.c: Don't escape commas in MONITOR_FILENAME. (asterisk[16])

Sean Bright asteriskteam at digium.com
Sun Sep 18 16:39:50 CDT 2022


Sean Bright has uploaded a new patch set (#2). ( https://gerrit.asterisk.org/c/asterisk/+/19300 )

Change subject: app_queue.c: Don't escape commas in MONITOR_FILENAME.
......................................................................

app_queue.c: Don't escape commas in MONITOR_FILENAME.

The contents of the MONITOR_FILENAME variable is evaluated when a
queue member is connected to a caller, allowing information about the
member to be included in the filename.

This is made possible by using ^{MEMBERINTERFACE} syntax instead of
${MEMBERINTERFACE} when assigning a value to MONITOR_FILENAME so that
evaluation does not occur immediately. The MONITOR_EXEC variable is
handled similarly.

Because of the way that MONITOR_EXEC works under the hood, the code
that performs the variable replacement also escapes commas before
doing so. However, this replacement should be taking place after the
variable replacement is done so that unescaped commas are not
erroneously passed to the MixMonitor start function.

Finally, having a comma in a filename is not problematic so we now
only escape commas after variable replacement is performed on
MONITOR_EXEC.

The main consequence of this change is that you can now use dialplan
functions with multiple arguments in MONITOR_FILENAME without the
commas being escaped before variable replacement occurs.

ASTERISK-30236 #close

Change-Id: Ib18481288c5292e27321e95364d7e63e8917252f
---
M apps/app_queue.c
A doc/CHANGES-staging/app_queue_monitor_filename_commas.txt
2 files changed, 58 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/00/19300/2
-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/19300
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: Ib18481288c5292e27321e95364d7e63e8917252f
Gerrit-Change-Number: 19300
Gerrit-PatchSet: 2
Gerrit-Owner: Sean Bright <sean at seanbright.com>
Gerrit-CC: Friendly Automation
Gerrit-MessageType: newpatchset
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220918/3f9f2ef3/attachment.html>


More information about the asterisk-code-review mailing list