]> git.ipfire.org Git - thirdparty/asterisk.git/commit
term: send proper reset sequence when black background is forced 42/342/1
authorD Tucny <d@tucny.com>
Sat, 2 May 2015 00:50:22 +0000 (20:50 -0400)
committerMatt Jordan <mjordan@digium.com>
Sun, 3 May 2015 14:41:15 +0000 (09:41 -0500)
commit92120247e99865d97a85461b08ba763e961e6232
treebd5b7d4a3a6f683a1748a1f224706379a1193f01
parent13819a34c4d0cd151da60502ef008dcde55b6dca
term: send proper reset sequence when black background is forced

When using the force black background command-line option or configuration
option an invalid reset sequence is sent following a coloured output item
in the CLI, the result is that the colour is not 'turned off' and continues
until the next non-default coloured text output.

A reset sequence is already defined in term.c, but the ast_term_reset
function doesn't use it, instead building it's own invalid sequence and
returning that.

This patch changes that behaviour, removing the building of a reset sequence
and instead using the pre-built constant 'enddata' which is a suitable reset
sequence for this purpose.

ASTERISK-24896 #close
Reported by: Dan Tucny

Change-Id: I56323899123ae3264900389cae1f5b252aa3bf43
main/term.c