aboutsummaryrefslogtreecommitdiffstats
path: root/pbx/pbx_config.c
AgeCommit message (Collapse)AuthorFilesLines
2008-10-10Reset continuation items at the beginning of each context (suggested bytilghman1-1/+9
kpfleming). git-svn-id: http://svn.digium.com/svn/asterisk/trunk@148329 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-10Add keyword "same", which allows you to create multiple steps in a dialplan,tilghman1-8/+17
without needing to respecify an extension pattern multiple times. (closes issue #13632) Reported by: blitzrage Patches: 20081006__bug13632.diff.txt uploaded by Corydon76 (license 14) Tested by: blitzrage, Corydon76 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@148325 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-07Start moving in changes from my resolve-shadow-warnings branch. Going to doseanbright1-6/+6
this in pieces so the diffs are a little bit smaller and more reviewable. pbx/ and formats/ first. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@136298 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-28remove remaining Zaptel references in various placeskpfleming1-10/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@134086 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-04Merged revisions 127973 via svnmerge from tilghman1-29/+60
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r127973 | tilghman | 2008-07-03 22:30:30 -0500 (Thu, 03 Jul 2008) | 8 lines Fix the 'dialplan remove extension' logic, so that it a) works with cidmatch, and b) completes contexts correctly when the extension is ambiguous. (closes issue #12980) Reported by: licedey Patches: 20080703__bug12980.diff.txt uploaded by Corydon76 (license 14) Tested by: Corydon76 ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@128027 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-19Allow alternative extensions to be specified for a user.tilghman1-1/+13
(closes issue #12830) Reported by: jcollie Patches: astertisk-trunk-121496-alternate-extensions.patch uploaded by jcollie (license 412) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@124049 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-12Goodbye Zaptel, hello DAHDI. Removes Zaptel driver support with DAHDI. ↵jpeeler1-9/+19
Configuration file and dialplan backwards compatability has been put in place where appropiate. Release announcement to follow. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@122234 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-04We like tabs.file1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@120337 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-04Merged revisions 120282 via svnmerge from file1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r120282 | file | 2008-06-04 10:31:09 -0300 (Wed, 04 Jun 2008) | 6 lines Fix a log message and add a message for when the dialplan is done reloading. (closes issue #12716) Reported by: chappell Patches: dialplan_reload_2.diff uploaded by chappell (license 8) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@120283 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-10(closes issue #6019)tilghman1-4/+22
Reported by: ssokol Patches: 20080304__bug6019.diff.txt uploaded by Corydon76 (license 14) Tested by: putnopvut git-svn-id: http://svn.digium.com/svn/asterisk/trunk@107231 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-07(closes issue #6002)murf1-6/+10
Reported by: rizzo Tested by: murf Proposal of the changes to be made, and then an announcement of how they were accomplished: http://lists.digium.com/pipermail/asterisk-dev/2008-February/032065.html and: http://lists.digium.com/pipermail/asterisk-dev/2008-March/032124.html Here is a recap, file by file, of what I have done: pbx/pbx_config.c pbx/pbx_ael.c All funcs that were passed a ptr to the context list, now will ALSO be passed a hashtab ptr to the same set. Why? because (for the time being), the dialplan is stored in both, to facilitate a quick, low-cost move to hash-tables to speed up dialplan processing. If it was deemed necessary to pass the context LIST, well, it is just as necessary to have the TABLE available. This is because the list/table in question might not be the global one, but temporary ones we would use to stage the dialplan on, and then swap into the global position when things are ready. We now have one external function for apps to use, "ast_context_find_or_create()" instead of the pre-existing "find" and "create", as all existing usages used both in tandem anyway. pbx_config, and pbx_ael, will stage the reloaded dialplan into local lists and tables, and then call merge_contexts_and_delete, which will merge (now) existing contexts and priorities from other registrars into this local set by copying them. Then, merge_contexts_and_delete will lock down the contexts, swap the lists and tables, and unlock (real quick), and then destroy the old dialplan. chan_sip.c chan_iax.c chan_skinny.c All the channel drivers that would add regcontexts now use the ast_context_find_or_create now. chan_sip also includes a small fix to get rid of warnings about removing priorities that never got entered. apps/app_meetme.c apps/app_dial.c apps/app_queue.c All the apps that added a context/exten/priority were also modified to use ast_context_find_or_create instead. include/asterisk/pbx.h ast_context_create() is removed. Find_or_create_ is the new method. ast_context_find_or_create() interface gets the hashtab added. ast_merge_contexts_and_delete() gets the local hashtab arg added. ast_wrlock_contexts_version() is added so you can detect if someone else got a writelock between your readlocking and writelocking. ast_hashtab_compare_contexts was made public for use in pbx_config/pbx_ael ast_hashtab_hash_contexts was in like fashion make public. include/asterisk/pval.h ast_compile_ael2() interface changed to include the local hashtab table ptr. main/features.c For the sake of the parking context, we use ast_context_find_or_create(). main/pbx.c I changed all the "tree" names to "table" instead. That's because the original implementation was based on binary trees. (had a free library). Then I moved to hashtabs. Now, the names move forward too. refcount field added to contexts, so you can keep track of how many modules wanted this context to exist. Some log messages that are warnings were inflated from LOG_NOTICE to LOG_WARNING. Added some calls to ast_verb(3,...) for debug messages Lots of little mods to ast_context_remove_extension2, which is now excersized in ways it was not previously; one definite bug fixed. find_or_create was upgraded to handle both local lists/tables as well as the globals. context_merge() was added to do the per-context merging of the old/present contexts/extens/prios into the new/proposed local list/tables ast_merge_contexts_and_delete() was heavily modified. ast_add_extension2() was also upgraded to handle changes. the context_destroy() code was re-engineered to handle the new way of doing things, by exten/prio instead of by context. res/ael/pval.c res/ael/ael.tab.c res/ael/ael.tab.h res/ael/ael.y res/ael/ael_lex.c res/ael/ael.flex utils/ael_main.c utils/extconf.c utils/conf2ael.c utils/Makefile Had to change the interface to ast_compile_ael2(), to include the hashtab ptr. This ended up involving several external apps. The main gotcha was I had to include lock.h and hashtab.h in several places. As a side note, I tested this stuff pretty thoroughly, I replicated the problems originally reported by Luigi, and made triply sure that reloads worked, and everything worked thru "stop gracefully". I found a and fixed a few bugs as I was merging into trunk, that did not appear in my tests of bug6002. How's this for verbose commit messages? git-svn-id: http://svn.digium.com/svn/asterisk/trunk@106757 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-26Use defined return values in load_module in more places.qwell1-4/+3
(closes issue #11096) Patches: pbx_config.c.patch uploaded by moy (license 222) pbx_dundi.c.patch uploaded by moy (license 222) pbx_gtkconsole.c.patch uploaded by moy (license 222) pbx_loopback.c.patch uploaded by moy (license 222) pbx_realtime.c.patch uploaded by moy (license 222) pbx_spool.c.patch uploaded by moy (license 222) app_adsiprog.c.patch uploaded by moy (license 222) app_alarmreceiver.c.patch uploaded by moy (license 222) app_amd.c.patch uploaded by moy (license 222) app_authenticate.c.patch uploaded by moy (license 222) app_cdr.c.patch uploaded by moy (license 222) app_zapateller.c.patch uploaded by moy (license 222) app_zapbarge.c.patch uploaded by moy (license 222) app_zapras.c.patch uploaded by moy (license 222) app_zapscan.c.patch uploaded by moy (license 222) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@94806 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-27closes issue #11294; missed the conditional unlock of the contexts when the ↵murf1-1/+1
hash table is used instead; also, used the ast_free_ptr as advised. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89792 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-26Merged revisions 89592 via svnmerge from file1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r89592 | file | 2007-11-26 13:36:45 -0400 (Mon, 26 Nov 2007) | 6 lines Use ast_free to free memory, or else we shall implode if MALLOC_DEBUG is enabled. (closes issue #11347) Reported by: ys Patches: pbx.pbx_config.c.diff uploaded by ys (license 281) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89593 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-24closes issue #11363; where the pattern _20x. buried in an included context, ↵murf1-2/+9
didn't match 2012; There were a small set of problems to fix: 1. I needed NOT to score patterns unless you are at the end of the data string. 2. Capital N,X,Z and small n,x,z are OK in patterns. I canonicalize the patterns in the trie to caps. 3. When a pattern ends with dot or exclamation, CANMATCH/MATCHMORE should always report this pattern, no matter the length. With this commit, I also supplied the wish of Luigi, where the user can select which pattern matching algorithm to use, the old (legacy) pattern matcher, or the new, trie based matcher. The OLD matcher is the default. A new [general] section variable, extenpatternmatchnew, is added to the extensions.conf, and the example config has it set to false. If true, the new matcher is used. In all other respects, the context/exten structs are the same; the tries and hashtabs are formed, but in the new mode the tries are not used. A new CLI command 'dialplan set extenpatternmatch true/false' is provided to allow switching at run time. I beg users that are forced to return to the old matcher to please report the reason in the bug tracker. Measured the speed benefit of the new matcher against an impossibly large context with 10,000 extensions: the new matcher is 374 times faster. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89547 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-22shuffle a little bit the content of header files to reduce dependencies.rizzo1-0/+1
In this commit: - move the ast_register/unregister_app functions to module.h to avoid the need to include pbx.h for the simpler apps; - move the ast_group structure to channel.h to remove the dependency of app.h on linkedlists.h Note, this is a long process that I am doing in small steps. The main difficulty is that now for each subsystem we have a single header (e.g. channel.h) included by the subsystem provider (usually one file, e.g. channel.c) and by its clients (dozens of them, e.g. we have some 70+ apps and 30+ functions). This requires the clients to include all the extra headers required by the provider (eg. lock.h, linkedlists.h, definitions of substructures...) even though many of the clients would be just happy with opaque struct declarations and function prototypes. The long term plan is to eventually rectify this structure so that the compilation can become faster, and also APIs are more stable. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89522 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-21remove another set of redundant #include "asterisk/options.h"rizzo1-1/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89512 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-20move asterisk/paths.h outside asterisk.h and into those filesrizzo1-0/+1
who really need it. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89466 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19more errno.h removalrizzo1-1/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89432 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16Start untangling header inclusion in a way that does not affectrizzo1-4/+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-01This commits the performance mods that give the priority processing engine ↵murf1-5/+1
in the pbx, a 25-30% speed boost. The two updates used, are, first, to merge the ast_exists_extension() and the ast_spawn_extension() where they are called sequentially in a loop in the code, into a slightly upgraded version of ast_spawn_extension(), with a few extra args; and, second, I modified the substitute_variables_helper_full, so it zeroes out the byte after the evaluated string instead of demanding you pre-zero the buffer; I also went thru the code and removed the code that zeroed this buffer before every call to the substitute_variables_helper_full. The first fix provides about a 9% speedup, and the second the rest. These figures come from the 'PIPS' benchmark I describe in blogs, conf. reports, etc. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@88166 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-22Switch from AST_CLI (formerly NEW_CLI) to AST_CLI_DEFINE, since the former ↵qwell1-8/+8
didn't make much sense git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86820 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-19Convert NEW_CLI to AST_CLI.qwell1-8/+8
Closes issue #11039, as suggested by seanbright. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86536 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-14Merged revisions 85540 via svnmerge from russell1-4/+11
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r85540 | russell | 2007-10-14 10:24:52 -0500 (Sun, 14 Oct 2007) | 7 lines Don't create the context for users in users.conf until we know at least one user exists. (closes issue #10971) Reported by: dimas Patches: pbxconfig.patch uploaded by dimas (license 88) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@85541 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-11Merge a ton of NEW_CLI conversions. Thanks to everyone that helped out! :)russell1-278/+319
(closes issue #10724) Reported by: eliel Patches: chan_skinny.c.patch uploaded by eliel (license 64) chan_oss.c.patch uploaded by eliel (license 64) chan_mgcp.c.patch2 uploaded by eliel (license 64) pbx_config.c.patch uploaded by seanbright (license 71) iax2-provision.c.patch uploaded by eliel (license 64) chan_gtalk.c.patch uploaded by eliel (license 64) pbx_ael.c.patch uploaded by seanbright (license 71) file.c.patch uploaded by seanbright (license 71) image.c.patch uploaded by seanbright (license 71) cli.c.patch uploaded by moy (license 222) astobj2.c.patch uploaded by moy (license 222) asterisk.c.patch uploaded by moy (license 222) res_limit.c.patch uploaded by seanbright (license 71) res_convert.c.patch uploaded by seanbright (license 71) res_crypto.c.patch uploaded by seanbright (license 71) app_osplookup.c.patch uploaded by seanbright (license 71) app_rpt.c.patch uploaded by seanbright (license 71) app_mixmonitor.c.patch uploaded by seanbright (license 71) channel.c.patch uploaded by seanbright (license 71) translate.c.patch uploaded by seanbright (license 71) udptl.c.patch uploaded by seanbright (license 71) threadstorage.c.patch uploaded by seanbright (license 71) db.c.patch uploaded by seanbright (license 71) cdr.c.patch uploaded by moy (license 222) pbd_dundi.c.patch uploaded by moy (license 222) app_osplookup-rev83558.patch uploaded by moy (license 222) res_clioriginate.c.patch uploaded by moy (license 222) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@85460 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-17Make the MALLOC_DEBUG output for free() useful again. After changing calls torussell1-3/+3
free to be ast_free, astmm said all calls to free were coming from utils.h git-svn-id: http://svn.digium.com/svn/asterisk/trunk@82628 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-16Don't reload a configuration file if nothing has changed.tilghman1-3/+6
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@79747 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-27'dialplan save' shouldn't be converting '|' back to ',' anymore.tilghman1-24/+3
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@77534 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-23Merge the dialplan_aesthetics branch. Most of this patch simply converts ↵tilghman1-17/+7
applications using old methods of parsing arguments to using the standard macros. However, the big change is that the really old way of specifying application and arguments separated by a comma will no longer work (e.g. NoOp,foo|bar). Instead, the way that has been recommended since long before 1.0 will become the only method available (e.g. NoOp(foo,bar). git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76703 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-09Merged revisions 73930 via svnmerge from file1-2/+2
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r73930 | file | 2007-07-08 22:13:57 -0300 (Sun, 08 Jul 2007) | 2 lines Add a few sanity checks when writing out the dialplan. (issue #10157 reported by dome) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@73931 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-27Merged revisions 72272 via svnmerge from russell1-0/+2
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r72272 | russell | 2007-06-27 16:08:34 -0500 (Wed, 27 Jun 2007) | 13 lines Merged revisions 72267 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r72267 | russell | 2007-06-27 16:06:45 -0500 (Wed, 27 Jun 2007) | 5 lines Fix a minor issue with parsing the priority number. You could have as much whitespace as you want around a numeric priority, but you couldn't have any whitespace around a special priority like "n" or "hint". (issue #10039, reported by mitheloc, fixed by me) ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@72274 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-12Completely remove all of the code related to jumping to priority n + 101. yay!russell1-4/+2
(issue #9926, caio1982) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@68970 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-11Merged revisions 68595 via svnmerge from tilghman1-8/+19
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r68595 | tilghman | 2007-06-10 23:21:30 -0500 (Sun, 10 Jun 2007) | 2 lines "dialplan save" produced garbage in the config file ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@68596 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-28Convert the PBX core to use read/write locks. This yields a nifty ↵file1-19/+19
performance improvement when it comes to simultaneous calls going through the dialplan. Using murf's test the old mutex based core took an average of 57.3 seconds while the rwlock based core took 31.1 seconds. That's a nifty 26.2 seconds performance improvement. The other good part is that if we do need to switch back then we just have to change the lock/unlock API calls. I converted everywhere that used to touch the mutex locks directly to use them. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@57184 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-26Merged revisions 56856 via svnmerge from file1-0/+2
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r56856 | file | 2007-02-26 15:07:18 -0500 (Mon, 26 Feb 2007) | 10 lines Merged revisions 56850 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r56850 | file | 2007-02-26 15:05:02 -0500 (Mon, 26 Feb 2007) | 2 lines Obey the clearglobalvars option in extensions reload (or dialplan reload depending on your version). (issue #9146 reported by ramonpeek) ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@56860 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-16Merged revisions 54898 via svnmerge from russell1-2/+4
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r54898 | russell | 2007-02-16 12:03:41 -0600 (Fri, 16 Feb 2007) | 4 lines Fix setting "autofallthrough" to yes by default. It was set to enabled in pbx.c. However, if the option was not present in extensions.conf, then pbx_config.c would set it back to disabled. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@54901 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-29Merged revisions 52679 via svnmerge from tilghman1-2/+2
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r52679 | tilghman | 2007-01-29 16:12:12 -0600 (Mon, 29 Jan 2007) | 2 lines Argument number correction ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@52680 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-06Merged revisions 49742 via svnmerge from qwell1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r49742 | qwell | 2007-01-05 18:24:38 -0600 (Fri, 05 Jan 2007) | 7 lines Save 1 whopping byte of allocated memory! This looks like it may have been a chicken/egg scenario.. You had to call a cleanup func, because everything was allocated. Then since you had to call a cleanup func, you were forced to allocate - ie; strdup(""). ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@49743 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-30Merged revisions 49073 via svnmerge from file1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r49073 | file | 2006-12-30 13:31:17 -0500 (Sat, 30 Dec 2006) | 2 lines IAX has been deprecated for quite some time so we had better use IAX2 when creating the dial string for users. (issue #8697 reported by ssokol) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@49074 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-21This small update will generate WARNINGS if there is garbage in your ↵murf1-0/+2
extensions.conf file (liken extem => instead of exten => !) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48723 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-02Merged revisions 44186 via svnmerge from pcadach1-0/+4
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r44186 | pcadach | 2006-10-03 00:52:56 +0600 (Втр, 03 Окт 2006) | 1 line Missed part of userconf functionality for chan_h323 ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@44196 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-21Lots more removal of deprecated thingstilghman1-843/+8
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43452 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-18merge qwell's CLI verbification workkpfleming1-106/+925
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-2/+104
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43052 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-31everything that loads a config that needs a config file to runmogorman1-4/+6
now reports AST_MODULE_LOAD_DECLINE when loading if config file is not there, also fixed an error in res_config_pgsql where it had a non static function when it should. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@41633 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-29Merged revisions 41269 via svnmerge from russell1-18/+13
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r41269 | russell | 2006-08-29 09:33:34 -0400 (Tue, 29 Aug 2006) | 3 lines clean up last commit ... most notably, there is no reason to do heap allocations here, and it also included a potential memory leak ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@41270 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-29Bugfix for 7813 applied to trunk as per patch supplied by stevensmurf1-4/+16
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@41267 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-21merge new_loader_completion branch, including (at least):kpfleming1-15/+8
- 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
2006-08-08Merge team/russell/ast_verbose_threadstoragerussell1-10/+1
- instead of defining a free() wrapper in a bunch of files, define it as ast_free() in utils.h and remove the copies from all the files. - centralize and abstract the code used for doing thread storage. The code lives in threadstorage.h, with one function being implemented in utils.c. This new API includes generic thread storage as well as special functions for handling thread local dynamic length string buffers. - update ast_inet_ntoa() to use the new threadstorage API - update ast_state2str() to use the new threadstorage API - update ast_cli() to use the new threadstorage API - Modify manager_event() to use thread storage. Instead of using a buffer of 4096 characters as the workspace for building the manager event, use a thread local dynamic string. Now there is no length limitation on the length of the body of a manager event. - Significantly simplify the handling of ast_verbose() ... - Instead of using a static char buffer and a lock to make sure only one thread can be using ast_verbose() at a time, use a thread local dynamic string as the workspace for preparing the verbose message. Instead of locking around the entire function, the only locking done now is when the message has been built and is being deliviered to the list of registered verbose message handlers. - This function was doing a strdup() on every message passed to it and keeping a queue of the last 200 messages in memory. This has been completely removed. The only place this was used was that if there were any messages in the verbose queue when a verbose handler was registered, all of the messages in the queue would be fed to it. So, I just made sure that the console verbose handler and the network verbose handler (for remote asterisk consoles) were registered before any verbose messages. pbx_gtkconsole and pbx_kdeconsole will now lose a few verbose messages at startup, but I didn't feel the performance hit of this message queue was worth saving the initial verbose output for these very rarely used modules. - I have removed the last three arguments to the verbose handlers, leaving only the string itself because they aren't needed anymore. For example, ast_verbose had some logic for telling the verbose handler to add a newline if the buffer was completely full. Now that the buffer can grow as needed, this doesn't matter anymore. - remove unused function, ast_verbose_dmesg() which was to dispatch the message queue - Convert the list of verbose handlers to use the linked list macros. - add missing newline characters to a few ast_verbose() calls - convert the list of log channels to use the linked list macros in logger.c - fix close_logger() to close all of the files it opened for logging - update ast_log() to use a thread local dynamic string for its workspace for preparing log messages instead of a buffer of size BUFSIZ (8kB on my system) allocated on the stack. The dynamic string in this case is limited to only growing to a maximum size of BUFSIZ. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@39272 f38db490-d61c-443f-a65b-d21fe96a405b