[asterisk-dev] [Code Review] 2641: ARI: Add support for getting/setting channel and global variables.
Jason Parker
reviewboard at asterisk.org
Mon Jul 1 13:51:26 CDT 2013
> On June 28, 2013, 10:18 p.m., David Lee wrote:
> > /trunk/res/stasis/control.c, lines 154-157
> > <https://reviewboard.asterisk.org/r/2641/diff/3/?file=40511#file40511line154>
> >
> > The doc for setvar_helper says "Will lock the channel." This lock isn't really needed.
This conflicts with Matt's previous comment, that said it needed to be locked.
Looking at the code for the function (again), it doesn't look like it needs to be locked. Removed, unless anybody tells me otherwise.
> On June 28, 2013, 10:18 p.m., David Lee wrote:
> > /trunk/res/stasis_http/resource_asterisk.c, lines 63-68
> > <https://reviewboard.asterisk.org/r/2641/diff/3/?file=40513#file40513line63>
> >
> > Ideally, you would return a 400 error code if the failure is the user's fault (trying to set a function that does not exist), or 500 if it's an internal error (a function unexpectedly failed).
> >
> > setvar_helper really doesn't distinguish the two, so I would err on the side of the user making the mistake and always return a 400 error code here.
Functions aren't executed if there isn't a channel. I'm removing this error entirely (though, I'm adding a 400 for a missing variable arg).
- Jason
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2641/#review9021
-----------------------------------------------------------
On June 27, 2013, 4:19 p.m., Jason Parker wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2641/
> -----------------------------------------------------------
>
> (Updated June 27, 2013, 4:19 p.m.)
>
>
> Review request for Asterisk Developers.
>
>
> Bugs: ASTERISK-21868
> https://issues.asterisk.org/jira/browse/ASTERISK-21868
>
>
> Repository: Asterisk
>
>
> Description
> -------
>
> Allows for reading channel variables (or functions), setting channel variables (or functions), getting global variables, setting global variables.
>
>
> Diffs
> -----
>
> /trunk/include/asterisk/stasis_app.h 393055
> /trunk/res/res_stasis_http_asterisk.c 393055
> /trunk/res/res_stasis_http_channels.c 393055
> /trunk/res/stasis/control.c 393055
> /trunk/res/stasis_http/resource_asterisk.h 393055
> /trunk/res/stasis_http/resource_asterisk.c 393055
> /trunk/res/stasis_http/resource_channels.h 393055
> /trunk/res/stasis_http/resource_channels.c 393055
> /trunk/res/stasis_json/resource_asterisk.h 393055
> /trunk/res/stasis_json/resource_channels.h 393055
> /trunk/rest-api/api-docs/asterisk.json 393055
> /trunk/rest-api/api-docs/channels.json 393055
>
> Diff: https://reviewboard.asterisk.org/r/2641/diff/
>
>
> Testing
> -------
>
> All 4 things work. Failures occur in the few places they would be expected (invalid function name, etc).
>
>
> Thanks,
>
> Jason Parker
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20130701/ad854494/attachment-0001.htm>
More information about the asterisk-dev
mailing list