aboutsummaryrefslogtreecommitdiffstats
path: root/main/config.c
AgeCommit message (Collapse)AuthorFilesLines
2010-09-09Transmit silence when reading DTMF in ast_readstring.qwell1-1/+1
Otherwise, you could get issues with DTMF timeouts causing hangups. (closes issue #17370) Reported by: makoto Patches: channel-readstring-silence-generator.patch uploaded by makoto (license 38) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@285742 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-05Remove extra line breaks from 'core show config mappings'pabelanger1-3/+1
(closes issue #17583) Reported by: pabelanger Patches: issue17583.patch uploaded by pabelanger (license 224) Tested by: lmadsen git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@273884 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-28Also trim trailing blanks on #includestilghman1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@272922 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-28Change the way that we read include files, to accommodate for changes in GCC ↵tilghman1-13/+6
4.4. (closes issue #17472) Reported by: seandarcy Patches: config2.patch uploaded by nivan (license 1066) Tested by: nivan git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@272921 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-18Plug a memory leak when reading configs with their comments.seanbright1-8/+15
While reading through configuration files with the intent of returning their full contents (comments specifically) we allocated some memory and then forgot to free it. This doesn't fix 16554 but clears up a leak I had in the lab. (issue #16554) Reported by: mav3rick Patches: issue16554_20100118.patch uploaded by seanbright (license 71) Tested by: seanbright git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@241015 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-16Properly deal with quotes in the arguments of '#exec' includes.tilghman1-9/+18
(closes issue #15583) Reported by: pkempgen Patches: 20090726__issue15583.diff.txt uploaded by tilghman (license 14) 20090726__issue15583-1.4-4.diff.txt uploaded by pkempgen (license 169) Tested by: pkempgen git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@219023 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-21Add check in configure script to check for GLOB_NOMAGIC and GLOB_BRACE in ↵dbailey1-8/+1
glob.h This allows config.c to compile when linked against uclibc that does not support these parameters git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@189601 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-25Fix the logic in config_text_file_save so that if anmmichelson1-3/+5
UpdateConfig manager action is issued and the file specified in DstFileName does not yet exist, an error is not returned. (closes issue #13341) Reported by: vadim Patches: 13341.patch uploaded by putnopvut (license 60) (with small modification from seanbright) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@139769 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-18Textual clarificationtilghman1-1/+1
(closes issue #13106) Reported by: flefoll Patches: config.c.br14.120173.patch-unknown-directive uploaded by flefoll (license 244) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@132107 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-03(closes issue #11594)jpeeler1-0/+4
Reported by: yem Tested by: yem This change decreases the buffer size allocated on the stack substantially in config_text_file_load when LOW_MEMORY is turned on. This change combined with the fix from revision 117462 (making mkintf not copy the zt_chan_conf structure) was enough to prevent the crash. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@120173 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-19(closes issue #11442)murf1-10/+21
Reported by: tzafrir Patches: 11442.patch uploaded by murf (license 17) Tested by: murf I didn't give tzafrir very much time to test this, but if he does still have remaining issues, he is welcome to re-open this bug, and we'll do what is called for. I reproduced the problem, and tested the fix, so I hope I am not jumping by just going ahead and committing the fix. The problem was with what file_save does with templates; firstly, it tended to print out multiple options: [my_category](!)(templateref) instead of [my_category](!,templateref) which is fixed by this patch. Nextly, the code to suppress output of duplicate declarations that would occur because the reader copies inherited declarations down the hierarchy, was not working. Thus: [master-template](!) mastervar = bar [template](!,master-template) tvar = value [cat](template) catvar = val would be rewritten as: ;! ;! Automatically generated configuration file ;! Filename: experiment.conf (/etc/asterisk/experiment.conf) ;! Generator: Manager ;! Creation Date: Tue Mar 18 23:17:46 2008 ;! [master-template](!) mastervar = bar [template](!,master-template) mastervar = bar tvar = value [cat](template) mastervar = bar tvar = value catvar = val This has been fixed. Since the config reader 'explodes' inherited vars into the category, users may, in certain circumstances, see output different from what they originally entered, but it should be both correct and equivalent. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@109908 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-25Allow the use of #include and #exec in situations where the max include ↵qwell1-1/+2
depth was only 1. Specifically, this fixes using #include and #exec in extconfig.conf. This was basically caused because the config file itself raises the include level to 1. I opted not to raise the include limit, because recursion here could cause very bizarre behavior. Pointed out, and tested by jmls (closes issue #12064) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@104092 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-14There are a lot of existing systems that #include non-existent files. So, torussell1-2/+11
make the transition to treating this as an error a bit less painless, just issue a huge error message for now. Then, later, we can reinstate the code that treats it as a failure. (Thanks to philippel for the feedback) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@93000 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-13If a typo is found in a config file, we previous continued on with what was ↵qwell1-1/+1
already loaded. We do not want to do this (see bug below for details). This makes it so that if a [ is found without a ], the entire config will fail, and nothing in it will be loaded. Isue #10690. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@92696 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-12If two config writes collide, file corruption could result. Use a mkstemp() ↵tilghman1-9/+22
file, instead. Reported by: paravoid Patch by: tilghman Closes issue #10781 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89191 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-06closes issue #8786 - where the [catname](!) and ↵murf1-7/+66
[catname](othercat1,othercat2,...) notation gets dropped across a ConfigUpdate (or any other thing that would cause a config file to be written). While I was at it, I also cleaned up some of the destroy routines to free up comments, which was not being done. Made sure the new struct I introduced is also cleaned up properly at destruction time. My code handles multiple template inclusions. Many thanks to ssokol for his patch, which, while not literally used in the final merge, served as a foundation for the fix. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89036 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-06Fix an issue with using UpdateConfig (manager action) where escaped semicolonsqwell1-3/+2
in a config would be converted to just semicolons (\; to ;) Issue 9938 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@78180 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-03Changed the behavior of sip's realtime_peer function to match the ↵mmichelson1-0/+8
corresponding way of matching for non-realtime peers. Now matches are made on both the IP address and port number, or if the insecure setting is set to "port" then just match on the IP address. In order to accomplish this, I also added a new API call, ast_category_root, which returns the first variable of an ast_category struct git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@78103 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-14Merged revisions 69469 via svnmerge from qwell1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r69469 | qwell | 2007-06-14 18:21:45 -0500 (Thu, 14 Jun 2007) | 4 lines Fix an issue where the line number in an unterminated comment block error message would show the wrong line number. "Reported" to me on #asterisk (somebody posted an error message, and I happened to catch it) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@69470 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-07Don't remove configuration from memory just because one section failed.oej1-1/+0
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@63254 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-26Merged revisions 61958 via svnmerge from file1-0/+2
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r61958 | file | 2007-04-25 21:25:03 -0400 (Wed, 25 Apr 2007) | 2 lines Don't count failed include attempts against the configuration include level. (issue #9593 reported by mostyn) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@61959 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-20Fix the UpdateConfig manager action to properly treat "variables" and "objects"russell1-39/+26
differently (a=b versus a=>b). (issue #9568, reported by pari, patch by me) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@61690 f38db490-d61c-443f-a65b-d21fe96a405b
2007-03-26Fix for 9257; by eliminating the globals in main/config.c, we make it ↵murf1-64/+65
thread-safe, which is a minimum requirement. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@59225 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-02Merged revisions 53117 via svnmerge from file1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r53117 | file | 2007-02-02 10:58:09 -0600 (Fri, 02 Feb 2007) | 2 lines Pass the glob expanded filename to process_text_line so that error messages contain the actual filename, not the original include one. (issue #8959 reported by tzafrir) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@53118 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-16It is possible for the config pointer to be NULL here, so it needs to berussell1-1/+1
checked before dereferencing it. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@51057 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-10Fix parsing when using something like ldap settings. (done by anthonyl)file1-1/+4
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@50405 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-05reduce stack consumption for AMI and AMI/HTTP requests by nearly 20K in most ↵kpfleming1-1/+0
cases git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@49676 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-04Only free comments and line buffer once we reach the first level. (issue ↵file1-12/+20
#8678 reported by ssokol, fixed by anthonyl) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@49551 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-15Merged revisions 47686,47688-47689 via svnmerge from kpfleming1-1/+7
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r47686 | kpfleming | 2006-11-15 13:42:05 -0600 (Wed, 15 Nov 2006) | 2 lines clear the category's variable tail pointer as well when variables are detached from it ........ r47688 | kpfleming | 2006-11-15 13:47:43 -0600 (Wed, 15 Nov 2006) | 2 lines when appending a list of variable to a category, ensure the tail pointer points to the last variable in the list ........ r47689 | kpfleming | 2006-11-15 13:58:46 -0600 (Wed, 15 Nov 2006) | 2 lines when re-writing the config file, don't repeat the path if it hasn't changed ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@47690 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-15Merged revisions 47682 via svnmerge from kpfleming1-3/+3
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r47682 | kpfleming | 2006-11-15 12:39:47 -0600 (Wed, 15 Nov 2006) | 2 lines ouch... don't use printf, use ast_log/ast_verbose ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@47684 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-13This solves bug 8342, whereby a crash occurs under certain circumstances ↵murf1-1/+1
while reading a config file with comments-- a call to CB_ADD shouldn't happen if withcomments is zero git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@47576 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-02Reverse change of "show" to "list" and make several other commands more ↵tilghman1-2/+2
consistent with "category verb arguments" git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@47051 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-01Cleanups suggested by Russell.murf1-31/+32
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@46760 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-26Fix config comment code preservation code (thanks murf!)markster1-10/+165
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@46287 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-20Constify the result of a config retrieval function, to avoid mutilation ↵tilghman1-3/+3
(issue 7983). git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43364 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-19similar patch for verbose vs debug with minor changesmogorman1-5/+5
bug 2617 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43272 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-18merge qwell's CLI verbification workkpfleming1-4/+12
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43212 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-16merge markster's usersconf branch with some slight changeskpfleming1-0/+10
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43052 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-21merge new_loader_completion branch, including (at least):kpfleming1-0/+1235
- restructured build tree and makefiles to eliminate recursion problems - support for embedded modules - support for static builds - simpler cross-compilation support - simpler module/loader interface (no exported symbols) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@40722 f38db490-d61c-443f-a65b-d21fe96a405b