[asterisk-dev] [Code Review] 3052: ARI: Allow specifying channel variables during a POST /channels

Kevin Harwell reviewboard at asterisk.org
Tue Dec 10 11:24:54 CST 2013



> On Dec. 9, 2013, 10:10 p.m., Matt Jordan wrote:
> > branches/12/main/http.c, lines 630-632
> > <https://reviewboard.asterisk.org/r/3052/diff/1/?file=49131#file49131line630>
> >
> >     Check for memory allocation failure of type here.
> >     
> >     What happens here if v->value is NULL?
> 
> rmudgett wrote:
>     Matt: I don't think v->value could ever be NULL here.

I am not sure if it can or can't be, but if it is NULL ast_copy_string will set the destination to an empty string.  I'll put a strlen_zero check in.


- Kevin


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


On Dec. 10, 2013, 10:51 a.m., Kevin Harwell wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3052/
> -----------------------------------------------------------
> 
> (Updated Dec. 10, 2013, 10:51 a.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-22872
>     https://issues.asterisk.org/jira/browse/ASTERISK-22872
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> Added the ability to specify channel variables when creating/originating a channel in ARI.  The variables are sent in the body of the request and should be formatted as a single level JSON object.  For example: {"variable1": "foo", "variable2": "bar"}. No nested objects allowed.
> 
> 
> Diffs
> -----
> 
>   branches/12/rest-api/api-docs/channels.json 403413 
>   branches/12/res/res_ari_channels.c 403413 
>   branches/12/res/ari/resource_channels.c 403413 
>   branches/12/res/ari/resource_channels.h 403413 
>   branches/12/main/http.c 403413 
> 
> Diff: https://reviewboard.asterisk.org/r/3052/diff/
> 
> 
> Testing
> -------
> 
> Some manual testing to make sure variables were being set.  Also wrote a test for the testsuite.
> 
> 
> Thanks,
> 
> Kevin Harwell
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20131210/5dba0e0f/attachment.html>


More information about the asterisk-dev mailing list