[asterisk-dev] [Code Review] properly report ast_func_read errors in getvar AMI action

Russell Bryant russell at digium.com
Tue Jan 27 07:20:30 CST 2009



> On 2009-01-26 16:33:30, Tilghman Lesher wrote:
> > /branches/1.4/main/manager.c, line 1514
> > <http://reviewboard.digium.com/r/125/diff/3/?file=2310#file2310line1514>
> >
> >     I'd like to point out that if you're reporting an error on ast_func_read returning -1, you should probably also report an error on the inability to allocate a channel.
> 
>  wrote:
>     ast_channel_alloc() should generate a log message internally if that fails, though.
>     
>     It may be fair to assume that for ast_func_read, too, but there are a lot more possibilities of what code is going to run from there.
> 
>  wrote:
>     I meant, reporting an error on AMI, same as the other error generation, when ast_func_read fails.  Of course, there are other errors generated in the logs, but it would probably be good to also report that error back to the AMI user.

Oh, oops.  Agreed!  Nice catch


- Russell


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.digium.com/r/125/#review328
-----------------------------------------------------------


On 2009-01-15 12:07:20, awk wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.digium.com/r/125/
> -----------------------------------------------------------
> 
> (Updated 2009-01-15 12:07:20)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> Fixed an issue where GetVar AMI Action would return an empty string for 'Value: ' when ast_func_read failed to read the function
> 
> 
> Diffs
> -----
> 
>   /branches/1.4/main/manager.c 168609 
> 
> Diff: http://reviewboard.digium.com/r/125/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> awk
> 
>




More information about the asterisk-dev mailing list