[asterisk-dev] [Code Review] Introduce CLI aliases and remove deprecated CLI commands because we now have aliases for them
Russell Bryant
russell at digium.com
Fri Nov 7 08:38:08 CST 2008
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.digium.com/r/32/#review98
-----------------------------------------------------------
trunk/main/cli.c
<http://reviewboard.digium.com/r/32/#comment180>
brace on the next line
trunk/res/res_clialiases.c
<http://reviewboard.digium.com/r/32/#comment181>
Usually, instead of having multiple malloc'd strings in a struct, I would say use the stringfields API instead. Since it's only 2 here, the benefits aren't quite as big. However, for the sake of consistency, I'd still say go with stringfields.
trunk/res/res_clialiases.c
<http://reviewboard.digium.com/r/32/#comment182>
return CMP_MATCH | CMP_STOP to be more explicit about what you want it to do
trunk/res/res_clialiases.c
<http://reviewboard.digium.com/r/32/#comment183>
You can simplify this a bit:
ao2_callback(cli_aliases, OBJ_UNLINK | OBJ_NODATA | OBJ_MULTIPLE, alias_marked, NULL);
- Russell
On 2008-11-05 17:11:12, Michiel van Baak wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.digium.com/r/32/
> -----------------------------------------------------------
>
> (Updated 2008-11-05 17:11:12)
>
>
> Review request for Asterisk Developers.
>
>
> Summary
> -------
>
> This patch introduces cli aliases.
> The config file holds a bunch of aliases for the deprecated commands in trunk so I could remove them from the code.
>
>
> Diffs
> -----
>
> trunk/channels/chan_mgcp.c 154935
> trunk/channels/chan_sip.c 154935
> trunk/channels/chan_skinny.c 154935
> trunk/configs/cli_aliases.conf.sample PRE-CREATION
> trunk/funcs/func_devstate.c 154935
> trunk/include/asterisk/cli.h 154935
> trunk/main/asterisk.c 154935
> trunk/main/cdr.c 154935
> trunk/main/cli.c 154935
> trunk/main/pbx.c 154935
> trunk/main/rtp.c 154935
> trunk/main/udptl.c 154935
> trunk/pbx/pbx_ael.c 154935
> trunk/pbx/pbx_dundi.c 154935
> trunk/res/res_agi.c 154935
> trunk/res/res_clialiases.c PRE-CREATION
> trunk/res/res_jabber.c 154935
>
> Diff: http://reviewboard.digium.com/r/32/diff
>
>
> Testing
> -------
>
> compiles, installs and runs fine on my development laptop running OpenBSD 4.4
>
>
> Thanks,
>
> Michiel
>
>
More information about the asterisk-dev
mailing list