[Asterisk-code-review] term: send proper reset sequence when black background is fo... (asterisk[13])
Matt Jordan
asteriskteam at digium.com
Sun May 3 09:41:16 CDT 2015
Matt Jordan has uploaded a new change for review.
https://gerrit.asterisk.org/342
Change subject: term: send proper reset sequence when black background is forced
......................................................................
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
---
M main/term.c
1 file changed, 1 insertion(+), 2 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/42/342/1
diff --git a/main/term.c b/main/term.c
index 2e28032..871a7cb 100644
--- a/main/term.c
+++ b/main/term.c
@@ -311,8 +311,7 @@
const char *ast_term_reset(void)
{
if (ast_opt_force_black_background) {
- static const char reset[] = { ESC, '[', COLOR_BLACK + 10, 'm', 0 };
- return reset;
+ return enddata;
} else {
return quitdata;
}
--
To view, visit https://gerrit.asterisk.org/342
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I56323899123ae3264900389cae1f5b252aa3bf43
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Matt Jordan <mjordan at digium.com>
Gerrit-Reviewer: dant <d at tucny.com>
More information about the asterisk-code-review
mailing list