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

Asterisk Bug Tracker noreply at bugs.digium.com
Fri Mar 5 00:19:20 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:                     new
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-05 00:19 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.
====================================================================== 

---------------------------------------------------------------------- 
 (0119012) jw-asterisk (reporter) - 2010-03-05 00:19
 https://issues.asterisk.org/view.php?id=16858#c119012 
---------------------------------------------------------------------- 
No, just reused a Fedora 12 rpm script.

In actual fact Fedora applies a patch
(0005-Build-using-external-libedit.patch) which does what says.

And I have to say that the Fedora scheme for naming that patch - without
any mention of asterisk - is really quite clueless.  They name all of the
patches 0000-xxxx etc which clearly doesn't form any association with
asterisk. And they clearly expose the patch to name clash with any of the
tens of thousands of other applications and their patches.

In any case it would still be best practice to ensure that any copy of a
potentially external library should only be an failsafe option and that it
should functionally match that external version.

The external libedit does encode whitespace, and there is a bug in the
asterisk version which has prevented whitespace from being encoded.  So for
compatability whitespace should be encoded, and the instance of strvis()
should be repaired, as should ast_el_read_history(). 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-03-05 00:19 jw-asterisk    Note Added: 0119012                          
======================================================================




More information about the asterisk-bugs mailing list