Make CLI "core show channel" not hold the channel lock during console output.
authorRichard Mudgett <rmudgett@digium.com>
Fri, 11 Nov 2011 18:02:52 +0000 (18:02 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Fri, 11 Nov 2011 18:02:52 +0000 (18:02 +0000)
commit39beaff425f4d91ba81c2dc9a181ae5571473a02
treecdfa852182cd25bf6da6b3ad340670a23c336caf
parent8d994bed55d1bd742e43fd5cf8fef6858e557450
Make CLI "core show channel" not hold the channel lock during console output.

Holding the channel lock while the CLI "core show channel" command is
executing can slow down the system.  It could block the system if the
console output is halted or paused.

* Made capture the CLI "core show channel" output into a buffer to be
output after the channel is unlocked.

* Removed use of C++ keyword as a variable name.  out renamed to obuf.

* Checked allocation of obuf for failure so will not crash.

(closes issue ASTERISK-18571)
Reported by: Pavel Troller
Tested by: rmudgett
........

Merged revisions 344661 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 344662 from http://svn.asterisk.org/svn/asterisk/branches/10

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@344663 65c4cc65-6c06-0410-ace0-fbb531ad65f3
main/cli.c