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

rmudgett reviewboard at asterisk.org
Tue Apr 10 12:42:01 CDT 2012



> On April 4, 2012, 4:38 p.m., rmudgett wrote:
> > /trunk/apps/app_skel.c, line 350
> > <https://reviewboard.asterisk.org/r/1841/diff/1/?file=26992#file26992line350>
> >
> >     A process_config lock is needed to serialize loading/reloading configuration requests.
> 
> Terry Wilson wrote:
>     Are you sure? The serialization happens at the apply_config stage in this example. Multiple simultaneous reloads will create new objects and will be swapped atomically.

I think that serialization using the global_config_transaction lock happens too late in the config loading.  I also had other issues with the use of that lock and the data organization as pointed out above.


- rmudgett


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


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/20120410/b222a065/attachment.htm>


More information about the asterisk-dev mailing list