[Asterisk-code-review] main/format cap: Parse capabilities generated by ast format ... (asterisk[13])

Matt Jordan asteriskteam at digium.com
Sun Jul 12 18:07:55 CDT 2015


Hello Anonymous Coward #1000019,

I'd like you to reexamine a change.  Please visit

    https://gerrit.asterisk.org/847

to look at the new patch set (#2).

Change subject: main/format_cap: Parse capabilities generated by ast_format_cap_get_names
......................................................................

main/format_cap: Parse capabilities generated by ast_format_cap_get_names

We have a strange relationship between the parsing of format
capabilities from a string and their representation as a string. We
expect the format capabilities to be expressed as a string in the
following format:

allow = !all,ulaw,alaw
disallow = g722

While we would generate the string representation of those formats as:

allow = (ulaw|alaw)
disallow = (ulaw|alaw|g729...)

When the configuration framework needs to store values as a string, it
generates the format capabilities using the second representation; this
representation however cannot be parsed when the entry is rehydrated.
This patch fixes that by updating
ast_format_cap_update_by_allow_disallow to parse an entry as if it were
in the generated format if it has a leading '(' and a trailing ')'.

ASTERISK-25238

Change-Id: I904d43caf4cf45af06f6aee0c9e58556eb91d6ca
---
M main/format_cap.c
1 file changed, 18 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/47/847/2
-- 
To view, visit https://gerrit.asterisk.org/847
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I904d43caf4cf45af06f6aee0c9e58556eb91d6ca
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Matt Jordan <mjordan at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019



More information about the asterisk-code-review mailing list