[asterisk-dev] [Code Review] 2413: Stasis http: Add configuration

Kevin Harwell reviewboard at asterisk.org
Fri Mar 29 09:10:50 CDT 2013



> On March 29, 2013, 6 a.m., David Lee wrote:
> > /team/dlee/stasis-http/include/asterisk/json.h, lines 594-595
> > <https://reviewboard.asterisk.org/r/2413/diff/2/?file=35092#file35092line594>
> >
> >     Why start at -1?

Initially the configuration option "pretty" mapped to a boolean and the configuration framework's boolean test returns -1 if true.  I made the enumeration start at -1 so it would match the value stored in the "pretty" option.  I have since changed it so the option is stored directly as an enum, so there is really no reason to start it at -1.  I will modify it before merging the changes into the main branch.


- Kevin


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


On March 28, 2013, 10:17 p.m., Kevin Harwell wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2413/
> -----------------------------------------------------------
> 
> (Updated March 28, 2013, 10:17 p.m.)
> 
> 
> Review request for Asterisk Developers and David Lee.
> 
> 
> Bugs: ASTERISK-21267
>     https://issues.asterisk.org/jira/browse/ASTERISK-21267
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> Added some basic configuration to stasis http.  Namely two global options:
> 
> enabled - defaults to yes and when set to no, stasis-http support is disabled.
> pretty - defaults to no (compact format) otherwise when set to yes, responses from stasis-http are formatted to be human readable.
> 
> 
> Diffs
> -----
> 
>   /team/dlee/stasis-http/include/asterisk/json.h 384301 
>   /team/dlee/stasis-http/main/json.c 384301 
>   /team/dlee/stasis-http/res/res_stasis_http.c 384301 
> 
> Diff: https://reviewboard.asterisk.org/r/2413/diff/
> 
> 
> Testing
> -------
> 
> Ran asterisk with no options specified in the configuration file and then viewed a response to make sure it was in the appropriate format.  From there added/modified the options in the config file in various combinations and then reloaded or unloaded/loaded the module each time config file was changed and viewed stasis http responses when appropriate.  Also ran a few of the existing relevant unit tests to make sure nothing broke.
> 
> 
> Thanks,
> 
> Kevin Harwell
> 
>

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


More information about the asterisk-dev mailing list