[asterisk-bugs] [Asterisk 0016858]: asterisk command history loads as unusable garbage

Asterisk Bug Tracker noreply at bugs.digium.com
Thu Mar 4 07:42:13 CST 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=16858 
====================================================================== 
Reported By:                jw-asterisk
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   16858
Category:                   Core/General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     feedback
Asterisk Version:           1.6.2.2 
JIRA:                       SWP-932 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2010-02-17 21:19 CST
Last Modified:              2010-03-04 07:42 CST
====================================================================== 
Summary:                    asterisk command history loads as unusable garbage
Description: 
When using asterisk interactively with command interface a history file is
created (~/.asterisk_history). Lines written to the history file are
white-space encoded (in ast_el_write_history:history:case
H_SAVE:history_save:strvis).

But when the history file is loaded it reverse (strunvis) is not
performed.  Therefore the history becomes unusable garbage.
====================================================================== 

---------------------------------------------------------------------- 
 (0118947) Marquis (reporter) - 2010-03-04 07:42
 https://issues.asterisk.org/view.php?id=16858#c118947 
---------------------------------------------------------------------- 
"I repeat: for the echo test I get "\040" from a recent install of "fedora
12" on the console screen (tty1) with TERM set to "linux"."

Actually, this is NOT a repeat of any kind.  You had not previously stated
the value of your TERM variable, nor that you were using tty1.  In fact, by
stating you were using xterm previously you implied that you were not using
a tty at all.

FWIW, I do get the literal '\040' from both my desktop system (F12,
recently updated) and a freshly-installed F12 system when I perform your
echo test as stated.

I do not, however, see the effect of the issue you have reported in the
Asterisk console from *any* combination of these two systems, TERM
settings(linux, xterm, vt100, vt220 were tried), actual terminal
apps/terminals (tty1, lxterminal, Konsole, xfterm4, xterm), or Asterisk
version (1.6.2 branch, trunk).

A default Fedora system has xpg_echo off, as do both of my systems.  I
have tried with it on, however, and for any of the permutations I tried it
made no difference.

There is obviously something different with your system (I'm not saying
wrong, just different) from a base F12 install, and I would be interested
in knowing what that is both so that I can reproduce the issue you are
seeing as well as run other tests with the Asterisk console to know if
there are other issues.

All of that said, I have tested with the provided new version of the
ast_el_read_history function and on both of my systems it seems to work
just fine. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-03-04 07:42 Marquis        Note Added: 0118947                          
======================================================================




More information about the asterisk-bugs mailing list