[asterisk-dev] [Code Review]: Add config parsing example code to app_skel

Paul Belanger reviewboard at asterisk.org
Wed Apr 4 10:54:25 CDT 2012



> On April 4, 2012, 9:53 a.m., Paul Belanger wrote:
> > /trunk/apps/app_skel.c, line 405
> > <https://reviewboard.asterisk.org/r/1841/diff/1/?file=26992#file26992line405>
> >
> >     Hotness!  I'm glad we are adding this to our example module.  It would be great to have a policy in place that 'module show config' be required for all modules with configuration files.
> >     
> >     What about adding something for the AMI too?  I think that also has value.
> 
> Tilghman Lesher wrote:
>     As your first exercise implementing this, Paul, I want you to write the corresponding CLI command for pbx_ael.so.  That's right.  I want you to read in the compiled-to-dialplan code and turn it back into readable configuration that compiles exactly to what the dialplan is.  And after you're released from the state mental hospital, I want you to make your case for this again.
>     
>     Making this policy will make a lot of modules simply hold the entire configuration file in memory, just to spit it out on request, because it's easier than trying to reverse the process of what's in memory back to readable configuration.  That's hardly a good use of memory.

Not sure if serious?

Understood, obviously if something drastically affects system memory we would not want to implement it. PBX modules are ready have 'dialplan show', so I think they could be skipped.  But my original statement / question remains.  If we have 'sip show settings' and 'manager show settings', it would be nice to have the other modules updated to include this too.  However, if you are saying the system memory is an issue, then why have them?


- Paul


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1841/#review5932
-----------------------------------------------------------


On April 2, 2012, 2:50 p.m., Terry Wilson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1841/
> -----------------------------------------------------------
> 
> (Updated April 2, 2012, 2:50 p.m.)
> 
> 
> Review request for Asterisk Developers, rmudgett and Matt Jordan.
> 
> 
> Summary
> -------
> 
> This patch adds config parsing to app_skel to serve as an example of how to properly write config handling using the ao2 global object API for thread-safe reloads. I also made a couple of whitespace changes even though they technically should have gone in a separate patch, but they didn't get in the way of seeing what changed, etc.
> 
> 
> Diffs
> -----
> 
>   /trunk/apps/app_skel.c 360984 
>   /trunk/configs/app_skel.conf.sample PRE-CREATION 
> 
> Diff: https://reviewboard.asterisk.org/r/1841/diff
> 
> 
> Testing
> -------
> 
> "skel show config/privates" and "memory show summary app_skel.c/config.c"
> 
> 
> Thanks,
> 
> Terry
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120404/b540980c/attachment.htm>


More information about the asterisk-dev mailing list