[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 09:35:06 CST 2008



> On 2008-11-07 08:38:08, Russell Bryant wrote:
> > trunk/res/res_clialiases.c, lines 47-48
> > <http://reviewboard.digium.com/r/32/diff/2/?file=1214#file1214line47>
> >
> >     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.
> 
>  wrote:
>     If the strings are not modified after the structure allocation, even stringfields are too much overhead; I'd just use the 'allocate after the structure' trick and put the strings directly into the same memory block as the structure.

Good point.  +1 to this suggestion.


- Russell


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.digium.com/r/32/#review98
-----------------------------------------------------------


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