aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/config.h
AgeCommit message (Collapse)AuthorFilesLines
2010-07-20Add load priority order, such that preload becomes unnecessary in most casestilghman1-0/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@278132 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-17Merged revisions 277568 via svnmerge from tilghman1-0/+21
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r277568 | tilghman | 2010-07-16 16:54:29 -0500 (Fri, 16 Jul 2010) | 8 lines Since we split values at the semicolon, we should store values with a semicolon as an encoded value. (closes issue #17369) Reported by: gkservice Patches: 20100625__issue17369.diff.txt uploaded by tilghman (license 14) Tested by: tilghman ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@277773 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-08Add IPv6 to Asterisk.mmichelson1-1/+9
This adds a generic API for accommodating IPv6 and IPv4 addresses within Asterisk. While many files have been updated to make use of the API, chan_sip and the RTP code are the files which actually support IPv6 addresses at the time of this commit. The way has been paved for easier upgrading for other files in the near future, though. Big thanks go to Simon Perrault, Marc Blanchet, and Jean-Philippe Dionne for their hard work on this. (closes issue #17565) Reported by: russell Patches: asteriskv6-test-report.pdf uploaded by russell (license 2) Review: https://reviewboard.asterisk.org/r/743 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@274783 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-30Remove unnecessary if test in CV_DSTR()rmudgett1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@273198 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-30Misc doxygen cleanup in config.hrmudgett1-41/+156
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@273197 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-09Add Doxygen documentation for API changes from 1.6.0 to 1.6.1jpeeler1-32/+45
Copied from my review board description: This is a continuation of the API changes documentation started for describing changes between releases. Most of the API changes were pretty simple needing only to be brought to attention via the new "Asterisk API Changes" list. However, if you see anything that needs further explanation feel free to supplement what is there. The current method of documenting is to add (in the header file): \version <ver number> <description of changes> and then to add the function to the change list in doxyref.h on the AstAPIChanges page. I also made sure all the functions that were newly added were tagged with \since 1.6.1. I think this is a good habit to start both for the historical aspect as well as for the future ability to easily add a "New Asterisk API" page. Review: http://reviewboard.digium.com/r/190/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@180719 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-18Merged revisions 177096 via svnmerge from tilghman1-3/+54
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r177096 | tilghman | 2009-02-18 12:30:38 -0600 (Wed, 18 Feb 2009) | 2 lines Document the return value of the update method (as requested on -dev list) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@177098 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-17Typooej1-1/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@176631 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-29incorporates r159808 from branches/1.4:kpfleming1-1/+1
------------------------------------------------------------------------ r159808 | kpfleming | 2008-11-29 10:58:29 -0600 (Sat, 29 Nov 2008) | 7 lines update dev-mode compiler flags to match the ones used by default on Ubuntu Intrepid, so all developers will see the same warnings and errors since this branch already had some printf format attributes, enable checking for them and tag functions that didn't have them format attributes in a consistent way ------------------------------------------------------------------------ in addition: move some format attributes from main/utils.c to the header files they belong in, and fix up references to the relevant functions based on new compiler warnings git-svn-id: http://svn.digium.com/svn/asterisk/trunk@159818 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-04Slightly optimize ast_devstate_str and rename global functions devstate2str ↵tilghman1-1/+2
and config_text_file_save to have an ast_ prefix git-svn-id: http://svn.digium.com/svn/asterisk/trunk@154260 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-14Add additional memory debugging to several core APIs, and fix several memorytilghman1-0/+5
leaks found with these changes. (Closes issue #13505, closes issue #13543) Reported by: mav3rick, triccyx Patches: 20081001__bug13505.diff.txt uploaded by Corydon76 (license 14) Tested by: mav3rick, triccyx git-svn-id: http://svn.digium.com/svn/asterisk/trunk@149199 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-14Merge realtime_update2 branch, which adds a new realtime API call namedtilghman1-0/+30
'update2', which permits updates which match across multiple columns, instead of requiring all tables to have a single unique identifier. All of the other API calls with the exception of 'update' already had the ability to match on multiple fields, so it was a missing and very desireable feature that an API call implementing an update should have this, too. This does not change any outward performance of Asterisk, but it should make life easier for application developers who use the RealTime framework. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@148570 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-12Create a new config file status, CONFIG_STATUS_FILEINVALID for differentiatingtilghman1-0/+2
when a file is invalid from when a file is missing. This is most important when we have two configuration files. Consider the following example: Old system: sip.conf users.conf Old result New result ======== ========== ========== ========== Missing Missing SIP doesn't load SIP doesn't load Missing OK SIP doesn't load SIP doesn't load Missing Invalid SIP doesn't load SIP doesn't load OK Missing SIP loads SIP loads OK OK SIP loads SIP loads OK Invalid SIP loads incompletely SIP doesn't load Invalid Missing SIP doesn't load SIP doesn't load Invalid OK SIP doesn't load SIP doesn't load Invalid Invalid SIP doesn't load SIP doesn't load So in the case when users.conf doesn't load because there's a typo that disrupts the syntax, we may only partially load users, instead of failing with an error, which may cause some calls not to get processed. Worse yet, the old system would do this with no indication that anything was even wrong. (closes issue #10690) Reported by: dtyoo Patches: 20080716__bug10690.diff.txt uploaded by Corydon76 (license 14) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@142992 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-05Add '+=' append operator to configuration files.tilghman1-0/+9
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@135717 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-13Document the input for ast_realtime_require_field()tilghman1-3/+15
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@122766 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-09Expand RQ_INTEGER type out to multiple types, one for each precisiontilghman1-1/+32
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@121367 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-05Merge the adaptive realtime branch, which will make adding new required fieldstilghman1-0/+37
to realtime less painful in the future. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@120789 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-02Okay, maybe FreeBSD will like this better.tilghman1-6/+6
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@115159 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-02Add attributes to various API calls, to help track down bugs (and remove a ↵tilghman1-6/+6
deprecated function) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@115157 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-26Add the "config reload <conffile>" command, which allows you to tell Asterisktilghman1-1/+1
to reload any file that references a given configuration file. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@111012 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-11An offhand comment from Russell made me realize that the configuration filetilghman1-3/+6
caching would not work properly for users.conf and any other file read from more than one place. I needed to add the filename which requested the config file to get it to work properly. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@107791 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-12Requested changes from Pari, reviewed by Russell.jpeeler1-1/+13
Added ability to retrieve list of categories in a config file. Added ability to retrieve the content of a particular category. Added ability to empty a context. Created new action to create a new file. Updated delete action to allow deletion by line number with respect to category. Added new action insert to add new variable to category at specified line. Updated action newcat to allow new category to be inserted in file above another existing category. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@103331 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-31Add CV_STRINGFIELD() macro. This lets you set a config variable to a string ↵russell1-0/+1
field. (from team/russell/chan_console) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@95410 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-20add some macros to simplify parsing the config file,rizzo1-0/+40
see description in config.h . They are a variant of the set of macros i used in chan_oss.c, structured in a way to be more robust to the presence of spurious ';' - basically, they define wrappers for 'do {' and '} while (0)', plus some helper functions to deal with simple cases such as ast_copy_string, ast_malloc, strtoul, ast_true ... The prefix (CV_ as 'Config Variable') tries to be easy to remember and has been chosen to not conflict with other existing macros in the tree. For the time being, I have only updated the three source files in the tree that used the old M_* macros. Hopefully, more files will be converted. NOTE: I understand that inventing my own dialect of C is generally wrong; however, the lack of adequate support in the language encourages lazy programming practices (such as ignoring errors, bounds, etc.) and this increases the chance of vulnerability in the code, especially because we are parsing user input here. Hopefully, these macros and the use of ast_parse_arg (in config.h) should encourage the programmer to write more robust code. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@94191 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-19add support for PARSE_DOUBLE, and remove identifiers forrizzo1-5/+8
types not supported (INT16 and UINT16) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@93925 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16Start untangling header inclusion in a way that does not affectrizzo1-1/+0
build times - tested, there is no measureable difference before and after this commit. In this change: use asterisk/compat.h to include a small set of system headers: inttypes.h, unistd.h, stddef.h, stddint.h, sys/types.h, stdarg.h, stdlib.h, alloca.h, stdio.h Where available, the inclusion is conditional on HAVE_FOO_H as determined by autoconf. Normally, source files should not include any of the above system headers, and instead use either "asterisk.h" or "asterisk/compat.h" which does it better. For the time being I have left alone second-level directories (main/db1-ast, etc.). git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89333 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16add a small new function to retrieve variables from a configrizzo1-0/+7
once we have a pointer to the category. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89322 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-14make the 'name' and 'value' fields in ast_variable const char *rizzo1-3/+5
This prevents modifying the strings in the stored variables, and catched a few instances where this was actually done. Given the differences between trunk and 1.4 (and the fact that this is effectively an API change) it is better to fix 1.4 independently. These are chan_sip.c::sip_register() chan_skinny.c:: near line 2847 config.c:: near line 1774 logger.c::make_components() res_adsi.c:: near line 1049 I may have missed some instances for modules that do not build here. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89268 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-12Doxygen fixes.qwell1-1/+1
Also fix a common typo I kept seeing (arguement) in various files. Closes issue #11222, patch by snuffy (with arguement > argument by me). git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89202 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-05this set of changes fixes issue # 10643 by keeping track of the last object ↵murf1-0/+1
defined in a file, and attaching any accumulated comments to that object (category header or variable declaration). The file_save routine also had to be upgraded to output these trailing comments. Config.h was modified to include the trailing comment list on categories and variables. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@81519 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-29This code was in team/murf/bug8684-trunk; it should fix bug 8684 in trunk. I ↵murf1-6/+9
didn't add it to 1.4 yet, because it's not entirely clear to me if this is a bug fix or an enhancement. A lot of files were affected by small changes like ast_variable_new getting an added arg, for the file name the var was defined in; ast_category_new gets added args of filename and lineno; ast_category and ast_variable structures now record file and lineno for each entry; a list of all #include and #execs in a config file (or any of its inclusions are now kept in the ast_config struct; at save time, each entry is put back into its proper file of origin, in order. #include and #exec directives are folded in properly. Headers indicating that the file was generated, are generated also for each included file. Some changes to main/manager.c to take care of file renaming, via the UpdateConfig command. Multiple inclusions of the same file are handled by exploding these into multiple include files, uniquely named. There's probably more, but I can't remember it right now. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@81361 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-16Don't reload a configuration file if nothing has changed.tilghman1-4/+21
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@79747 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-06Merged revisions 78103 via svnmerge from mmichelson1-2/+9
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r78103 | mmichelson | 2007-08-03 15:25:22 -0500 (Fri, 03 Aug 2007) | 7 lines Changed the behavior of sip's realtime_peer function to match the 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/trunk@78186 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-17Make trunk build once again.file1-5/+7
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75381 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-17Introduce ast_parse_arg() , a generic function to parse stringsrizzo1-0/+82
in a consistent way. This is meant to replace the custom code which is repeated all over the place in the various files when parsing config files, CLI entries and other string information. Right now the code supports parsing int32, uint32 and sockaddr_in with optional default values and bound checks. It contains minimal error checking, but that can be easily extended as the need arises. Being a new API i am introducing this only in trunk, though I believe that once the interface has been ironed out it might become a worthwhile addition to 1.4 as well - basically, the first time we will need to fix a piece of argument parsing code, we might as well bring in this change and use the new API instead. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75379 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-16Merge a bunch of doxygen updates to header files. This includes changes torussell1-18/+34
use the \retval tag for documenting return values, fixing various warnings when generating the documentation, and various other things. (closes issue #10203, snuffy) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75164 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-20Merged revisions 61690 via svnmerge from russell1-1/+2
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r61690 | russell | 2007-04-20 13:19:18 -0500 (Fri, 20 Apr 2007) | 4 lines Fix the UpdateConfig manager action to properly treat "variables" and "objects" differently (a=b versus a=>b). (issue #9568, reported by pari, patch by me) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@61691 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-11via 8118, a RealTime upgrade to make RT a complete storage abstraction. The ↵murf1-0/+17
store/destroy mechanisms needed these missing peices. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@61374 f38db490-d61c-443f-a65b-d21fe96a405b
2007-03-27Enhancement via 8118: Realtime API extension: add methods store_func and ↵murf1-0/+4
destroy_func, to make Realtime a complete database abstraction git-svn-id: http://svn.digium.com/svn/asterisk/trunk@59253 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-24Doxygen additions, correctionsoej1-0/+3
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@56665 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-14New CLI command "Core show settings" to list some core settingsoej1-0/+3
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@54464 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-07When calling the Realtime app more than once, unset fields which weretilghman1-0/+1
previously set are erroneously still set (Bug 6701). After discussion, it was determined this should only be changed in trunk. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@49801 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-05a little more const-ificationkpfleming1-3/+3
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@49727 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-20Constify the result of a config retrieval function, to avoid mutilation ↵tilghman1-2/+2
(issue 7983). git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43364 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-16merge markster's usersconf branch with some slight changeskpfleming1-0/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43052 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-29Allow updates to match specific lines, allow specification of object or markster1-2/+2
no when appending. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38489 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-19First pass at in-place file manipulation via managermarkster1-3/+5
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@37936 f38db490-d61c-443f-a65b-d21fe96a405b
2006-03-07Bug 5702 - Realtime patch for meetmetilghman1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@12232 f38db490-d61c-443f-a65b-d21fe96a405b
2006-02-24Reverting revision 10998 that was accidentaly committed to trunk. My apologies.oej1-4/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@10989 f38db490-d61c-443f-a65b-d21fe96a405b
2006-02-24Update to trunkoej1-0/+4
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@10988 f38db490-d61c-443f-a65b-d21fe96a405b