[asterisk-dev] [Code Review] 0019287: inverse / incorrect behavior for CLI / console logging of DTMF

jrose reviewboard at asterisk.org
Thu Jun 2 15:18:24 CDT 2011


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

(Updated 2011-06-02 15:18:23.941312)


Review request for Asterisk Developers, Russell Bryant and David Vossel.


Changes
-------

Switching what we are looking for proved problematic.  The way the defaults are set is confusing and the way the way things work with asterisk ran from -gcvvv add even more confusion to this, and if I were to simply say "0 = off, 1 = on", I'd have to track down a bunch of things that don't appear to in any way shape or form obvious.

It's much easier in this case to simply flip whatever input is sent into the level toggle function, and reviewing the code made it seem that the only place the toggle function is used is in logger.c anyway.

At this point I'm not sure whether it's more keen to do it this way or to reverse within the function in logger.c.  It doesn't matter a whole ton as far as functionality is concerned, but I think it's slightly less confusing to have it here.  I should probably add some comments talking about this particular source of confusion and why it is still that way.


Summary
-------

ast_network_puts_mutable writes to a connected console client only if it's level was set to false.  This changes that function to write it only if it is set to true to resolve the reverse behavior from expectations issue.

This seems like the way to go, but I can't see for the life of me why this mistake would be made if it really was just a mistake.  It's hard to say.


This addresses bug 19287.
    https://issues.asterisk.org/view.php?id=19287


Diffs (updated)
-----

  /branches/1.8/main/asterisk.c 321530 

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


Testing
-------

Just tested with a couple of connected clients.  I'll test more tomorrow.


Thanks,

jrose

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20110602/a3d659a8/attachment.htm>


More information about the asterisk-dev mailing list