[asterisk-commits] tilghman: branch 1.4 r266585 - /branches/1.4/main/asterisk.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jun 1 10:17:50 CDT 2010


Author: tilghman
Date: Tue Jun  1 10:17:46 2010
New Revision: 266585

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=266585
Log:
Prevent CLI prompt from distorting output of lines shorter than the prompt.

Uses the VT100 method of clearing the line from the cursor position to the
end of the line:  Esc-0K

(closes issue #17160)
 Reported by: coolmig
 Patches: 
       20100531__issue17160.diff.txt uploaded by tilghman (license 14)
 Tested by: coolmig

Modified:
    branches/1.4/main/asterisk.c

Modified: branches/1.4/main/asterisk.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/main/asterisk.c?view=diff&rev=266585&r1=266584&r2=266585
==============================================================================
--- branches/1.4/main/asterisk.c (original)
+++ branches/1.4/main/asterisk.c Tue Jun  1 10:17:46 2010
@@ -1863,7 +1863,7 @@
 
 			/* Write over the CLI prompt */
 			if (!ast_opt_exec && !lastpos) {
-				if (write(STDOUT_FILENO, "\r", 1) < 0) {
+				if (write(STDOUT_FILENO, "\r", 5) < 0) {
 				}
 			}
 			if (write(STDOUT_FILENO, buf, res) < 0) {




More information about the asterisk-commits mailing list