[asterisk-dev] [Code Review] Fix a problem with channel name tab completion

Russell Bryant russell at digium.com
Wed Jul 28 15:59:50 CDT 2010


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

Review request for Asterisk Developers.


Summary
-------

It was reported to me internally that there was a problem with channel name tab completion in Asterisk 1.8.  As I looked further, it worked fine as long as you typed part of the channel name.  It failed to provide any suggested results when hitting tab starting from a blank channel name.

I traced the regression down to the way that channel iterators with parameters work.  In this case, an iterator by name was created with a blank name.  In this case, the iterator treated no channels as a match.  This patch changes behavior such that if an iterator by name is created with a blank name, it treats all channels as a match.

This patch also applies the same change in behavior to the other iterator types.  For example, if an iterator by extension is created with a blank extension string, all channels will now match.


Diffs
-----

  /branches/1.8/main/channel.c 280225 

Diff: https://reviewboard.asterisk.org/r/818/diff


Testing
-------

Verified that channel name tab completion now works as expected using the "channel request hangup <tab>" command.


Thanks,

Russell




More information about the asterisk-dev mailing list