[asterisk-bugs] [Asterisk-GUI 0018268]: [patch] Asterisk-Gui config editor inserting black space and scrambling config layout.

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Feb 16 03:44:52 CST 2011


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=18268 
====================================================================== 
Reported By:                eit
Assigned To:                lathama
====================================================================== 
Project:                    Asterisk-GUI
Issue ID:                   18268
Category:                   General
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     assigned
Asterisk GUI Version:       I did not set the version :( 
Asterisk Version:           1.6.2.13 
JIRA:                        
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2010-11-05 19:17 CDT
Last Modified:              2011-02-16 03:44 CST
====================================================================== 
Summary:                    [patch] Asterisk-Gui config editor inserting black
space and scrambling config layout.
Description: 
This seems to be the same issue as bug 0013420.  I am using asterisk
1.6.2.13 from tarball and asterisk-gui SVN-branch-2.0-r5114.  I am
upgrading from an older release of both asterisk and asterisk-gui.  I have
tried with both a default blank config as well as the imported config. 
Esentially everything works fine and as I go through and begin tweaking
settings through the gui i start to notice large blank spaces in the config
files.  Then if I continue to make changes I start seeing the layout begin
to become scrambled.  For example after about 6 or six different gui edit's
I noticed my ringroups-custom-1 context was intermingled with my global
context inside extensions.conf.  I saw similar issues inside users.conf
where user setting were doubled or overlapped with other users.  
====================================================================== 

---------------------------------------------------------------------- 
 (0132011) FabienToune (reporter) - 2011-02-16 03:44
 https://issues.asterisk.org/view.php?id=18268#c132011 
---------------------------------------------------------------------- 
Actually, the problem is deeper than what I thought. Simply try to create a
new user with no CLID, Alaw and GSM as codecs SIP and no IAX, and you'll
already have to white lines in the config.
This comes from two things :
1) the gui create mixed sequences of updates in one single request (eg :
update, delcat, delcat, newcat, newcat). This should work fine... BUT
2) asterisk doesn't keep linenos updated during the changes and end with
many linenos=0 just before saving the file.
This leads to many issues, including white lines and scrambling...

I first tried to update all procedures in config.c (work in progress...)
and finally realized that it was safer and easier to prettify linenos in
the ast_config just before saving the file.

I join a patch wich does that via a ast_config_pretify function, and also
fix some little bugs i found

Hope it'll help... :-) 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-02-16 03:44 FabienToune    Note Added: 0132011                          
======================================================================




More information about the asterisk-bugs mailing list