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

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Mar 3 17:38:53 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-03 17:38 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.
====================================================================== 

---------------------------------------------------------------------- 
 (0118918) jw-asterisk (reporter) - 2010-03-03 17:38
 https://issues.asterisk.org/view.php?id=16858#c118918 
---------------------------------------------------------------------- 
jtodd said: "History works fine on MacOS 1.6.2".  He did not mention the
minor revision.  He did not mention whether retrieval of saved history
works ... just that history works.  He didn't mention what localized
patches might have been applied.

imadsen didn't indicate what version was working for him.

The answer to the questions have already been supplied.  The bug report
states what version it relates to.  The platform is Linux Fedora Core 12
but it has been compiled from new source (not the fc12 supplied version),
so the platform is largely irrelevant.

For goodness sake ... if this is the attitude taken when there is a
blatant bug (I suppose nobody has bothered to even read the source - it is
so obvious) then no wonder asterisk is so bug-ridden.

FYI I have already patched my asterisk to fix the bug - basically by
replacing the body of funtion ast_el_read_history() with:

<pre>
> static int ast_el_read_history(char *filename)
> {
>       HistEvent ev = {0};
> 
>        if (el_hist == NULL || el == NULL)
>                ast_el_initialize();
>       return (history(el_hist, &ev, H_LOAD, filename))
>}
</pre>

And, of course, it fixed the problem!

Is that any help? 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-03-03 17:38 jw-asterisk    Note Added: 0118918                          
======================================================================




More information about the asterisk-bugs mailing list