[asterisk-dev] [Code Review] Add option for asterisk -rx timeout length

Russell Bryant russell at digium.com
Thu Mar 18 13:17:14 CDT 2010



> On 2010-03-18 13:02:29, Tilghman Lesher wrote:
> > Actually, we could just get rid of the timeout altogether.  We've already added the "cli quit after" prefix, which forces an implicit 'quit' after the command finishes executing, anyway.
> 
> Russell Bryant wrote:
>     Hm, good point! :-)
>     
>     Then I suppose the only benefit to keeping the timeout would be if the command is hanging due to a deadlock or something.  In that case, exiting eventually might still be a good idea, but perhaps just a much longer timeout than 500 ms.  Say, 60 seconds?  What do you think?
> 
> Tilghman Lesher wrote:
>     Sure, sounds fine.

Perfect.  Thanks for the feedback.  I'll just make the trivial timeout change.


- Russell


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


On 2010-03-18 12:40:49, Russell Bryant wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/573/
> -----------------------------------------------------------
> 
> (Updated 2010-03-18 12:40:49)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> I noticed that when using asterisk -rx to execute "test execute all", I never get all of the output from the command.  The process exits early.  This patch at least helps that situation.  asterisk -rx is actually quite a hack.  This patch does not change the fact that it is a hack, but it allows you to control the timeout used before it exits.
> 
> Obviously, using astcli is a better solution, but this still seems like a worthwhile improvement to using asterisk -rx.
> 
> 
> This addresses bug 17049.
>     https://issues.asterisk.org/view.php?id=17049
> 
> 
> Diffs
> -----
> 
>   /trunk/Makefile 253259 
>   /trunk/doc/asterisk.8 253259 
>   /trunk/doc/asterisk.sgml 253259 
>   /trunk/main/asterisk.c 253259 
> 
> Diff: https://reviewboard.asterisk.org/r/573/diff
> 
> 
> Testing
> -------
> 
> With this patch, asterisk -rx "test execute all" will exit early.  asterisk -rx "test execute all" -w 10000 allows me to get all of the output (until someone writes a test that doesn't produce any output in 10 seconds ...).
> 
> 
> Thanks,
> 
> Russell
> 
>




More information about the asterisk-dev mailing list