[asterisk-dev] [Code Review] 3043: pjsip: CLI commands
Jonathan Rose
reviewboard at asterisk.org
Thu Dec 5 14:35:49 CST 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3043/#review10313
-----------------------------------------------------------
branches/12/res/res_pjsip/pjsip_configuration.c
<https://reviewboard.asterisk.org/r/3043/#comment19704>
This produces GCC warnings with my version of GCC (4.6.3).
You need to use a defined format string here for safety purposes. You can't just create your format string during runtime because the compiler verifies it against the arguments provided to ast_cli.
I'm pretty sure there are ways to achieve what you want here just by using a slightly more elaborate format string. Check out this patch I wrote for manager show commands for something similar: https://reviewboard.asterisk.org/r/2143/
Always remember to make sure your changes compile with developer mode enabled. To turn on developer mode, use the --enable-dev-mode option when configuring like so:
$./configure --enable-dev-mode
- Jonathan Rose
On Dec. 5, 2013, 6:27 p.m., George Joseph wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3043/
> -----------------------------------------------------------
>
> (Updated Dec. 5, 2013, 6:27 p.m.)
>
>
> Review request for Asterisk Developers.
>
>
> Bugs: ASTERISK-22610
> https://issues.asterisk.org/jira/browse/ASTERISK-22610
>
>
> Repository: Asterisk
>
>
> Description
> -------
>
> Implements the following cli commands:
> pjsip list aors
> pjsip list auths
> pjsip list channels
> pjsip list contacts
> pjsip list endpoints
> pjsip show aor(s)
> pjsip show auth(s)
> pjsip show channels
> pjsip show endpoint(s)
>
> Also...
> Minor modifications made to the AMI command implementations to facilitate reuse.
> New function ast_variable_list_sort added to config.c and config.h to implement variable list sorting.
> New api ast_sip_for_each_identify added to module res_pjsip_endpoint_identifier_ip. Required new files res_pjsip_endpoint_identifier_ip.h and res_pjsip_endpoint_identifier_ip.exports.in.
>
> Implementation of the summary statistics is still pending.
> I'm sure there will be lots of feedback here. :)
>
>
> Diffs
> -----
>
> branches/12/res/res_pjsip_registrar.c 403390
> branches/12/res/res_pjsip_endpoint_identifier_ip.exports.in PRE-CREATION
> branches/12/res/res_pjsip_endpoint_identifier_ip.c 403390
> branches/12/res/res_pjsip/pjsip_configuration.c 403390
> branches/12/res/res_pjsip/location.c 403390
> branches/12/res/res_pjsip/include/res_pjsip_private.h 403390
> branches/12/main/config.c 403390
> branches/12/include/asterisk/res_pjsip_endpoint_identifier_ip.h PRE-CREATION
> branches/12/include/asterisk/res_pjsip.h 403390
> branches/12/include/asterisk/config.h 403390
>
> Diff: https://reviewboard.asterisk.org/r/3043/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> George Joseph
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20131205/5f87eb95/attachment-0001.html>
More information about the asterisk-dev
mailing list