Summary: | ASTERISK-13610: [patch] users.conf (and other .conf files) have incorrect whitespacing | ||
Reporter: | Greg Nutt (timeshell) | Labels: | |
Date Opened: | 2009-02-19 11:19:23.000-0600 | Date Closed: | 2010-04-27 11:07:29 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | Core/Configuration |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) 20090413__bug14509.diff.txt ( 1) 20090504__bug14509.diff.txt ( 2) Diffs.zip | |
Description: | T users.conf (and other .conf files) have incorrect whitespacing. I have noticed when deleting entries that the text is deleted, but not the line the text resided in. Other files appear to have similar symptoms, such as the extensions.conf. Diff files will be attached. ****** ADDITIONAL INFORMATION ****** Asterisk SVN-branch-1.6.0-r174596 asterisk-gui SVN Revision 4519 A similar bug appears to have caused one of my previous users.conf files to grow to over 2GB in size and become corrupted. | ||
Comments: | By: Tilghman Lesher (tilghman) 2009-04-13 17:51:03 Patch uploaded; ready for testing. By: Ryan Brindley (rbrindley) 2009-04-15 12:23:11 tilghman, this patch resolves the case when an 'update' http ami action added an extra line when updating, but doesn't solve the more important case where a 'delcat' http ami action (tested deleting [6002] in users.conf) doesn't remove the lines, but just replaces them with empty lines. I did, however, test this in 1.6.0 instead of trunk (I just backorted the patch) By: Ryan Brindley (rbrindley) 2009-04-15 12:36:59 tilghman, In doing some testing i found something that might be worth noting. Everything works properly when you delcat the last context in the file, just not one of the middle ones. By: Ryan Brindley (rbrindley) 2009-04-15 12:43:06 just confirmed in trunk that I can reproduce By: Tilghman Lesher (tilghman) 2009-05-04 15:36:37 I haven't had time to test this yet, but it should theoretically work. By: Greg Nutt (timeshell) 2009-05-21 08:49:57 Adding a new outgoing rule to extensions.conf using the asterisk-gui2 seemed to work fine. However, adding a new user in users.conf created 2 spaces between some of the entries in the new user context after the first 2 lines (not including the context header). Edits of said user still create additional spacing between configuration lines. By: Greg Nutt (timeshell) 2009-05-21 08:52:38 Additionally, there appears to be no whitespace to separate contexts from each other. They all look like they run into each other. By: Tilghman Lesher (tilghman) 2009-05-21 12:37:57 I'm not overly concerned about contexts running into one another. The stated intent is to create configuration files that are machine-parseable and don't dramatically expand the amount of whitespace within the file. If this patch does that, then I think we've accomplished our goal. By: Digium Subversion (svnbot) 2009-06-23 16:25:19 Repository: asterisk Revision: 202753 U trunk/main/config.c ------------------------------------------------------------------------ r202753 | rbrindley | 2009-06-23 16:25:18 -0500 (Tue, 23 Jun 2009) | 9 lines If we delete the info, lets also delete the lines (closes issue ASTERISK-13610) Reported by: timeshell Patches: 20090504__bug14509.diff.txt uploaded by tilghman (license 14) Tested by: awk, timeshell ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=202753 By: Digium Subversion (svnbot) 2009-06-23 16:26:49 Repository: asterisk Revision: 202754 _U branches/1.6.0/ U branches/1.6.0/main/config.c ------------------------------------------------------------------------ r202754 | rbrindley | 2009-06-23 16:26:48 -0500 (Tue, 23 Jun 2009) | 15 lines Merged revisions 202753 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r202753 | rbrindley | 2009-06-23 16:25:17 -0500 (Tue, 23 Jun 2009) | 9 lines If we delete the info, lets also delete the lines (closes issue ASTERISK-13610) Reported by: timeshell Patches: 20090504__bug14509.diff.txt uploaded by tilghman (license 14) Tested by: awk, timeshell ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=202754 By: Leif Madsen (lmadsen) 2010-04-27 11:07:29 With cron and the script in 17250 you could work around this issue if you're still experiencing it (hack) |