[asterisk-dev] [Code Review] 2413: Stasis http: Add configuration
opticron
reviewboard at asterisk.org
Thu Mar 28 09:51:12 CDT 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2413/#review8149
-----------------------------------------------------------
/team/dlee/stasis-http/include/asterisk/json.h
<https://reviewboard.asterisk.org/r/2413/#comment15709>
It's formats all the way down.
/team/dlee/stasis-http/include/asterisk/json.h
<https://reviewboard.asterisk.org/r/2413/#comment15710>
This one, too.
/team/dlee/stasis-http/include/asterisk/json.h
<https://reviewboard.asterisk.org/r/2413/#comment15711>
Idem.
/team/dlee/stasis-http/include/asterisk/json.h
<https://reviewboard.asterisk.org/r/2413/#comment15712>
Idem.
/team/dlee/stasis-http/res/res_stasis_http.c
<https://reviewboard.asterisk.org/r/2413/#comment15713>
This should be a enum ast_json_encoding_format.
I was thinking about adding #define shortcuts for all the modified functions in json.h that will now take an extra argument that the vast majority of usages just won't care about, but I'm still on the fence about it.
Example:
char *ast_json_dump_string_format(struct ast_json *root, enum ast_json_encoding_format format);
#define ast_json_dump_string(root) \
ast_json_dump_string_format(root, AST_JSON_FORMAT_COMPACT)
Anyway, up to you.
- opticron
On March 22, 2013, 12:29 p.m., Kevin Harwell wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2413/
> -----------------------------------------------------------
>
> (Updated March 22, 2013, 12:29 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 383653
> /team/dlee/stasis-http/res/res_json.c 383653
> /team/dlee/stasis-http/res/res_stasis_http.c 383653
> /team/dlee/stasis-http/res/res_stasis_websocket.c 383653
> /team/dlee/stasis-http/tests/test_json.c 383653
>
> 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/20130328/977f5c4f/attachment.htm>
More information about the asterisk-dev
mailing list