summaryrefslogtreecommitdiff
path: root/utils
AgeCommit message (Collapse)Author
2007-11-01This commits the performance mods that give the priority processing engine ↵Steve Murphy
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: https://origsvn.digium.com/svn/asterisk/trunk@88166 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-01Remove another copied source file on "make clean".Russell Bryant
(closes issue #11137) Reported by: IgorG Patches: addonclean-87971-1.patch uploaded by IgorG (license 20) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@88062 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-29UGH... while trying to fix #10995, I found all kinds of cruft in this ↵Kevin P. Fleming
Makefile. It should all be gone now, and as a side effect hashtest2 now builds with --enable-dev-mode enabled without a host of errors git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@87498 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-29clean up assembler and preprocessor files if they are here tooKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@87467 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-26Merged revisions 87168 via svnmerge from Steve Murphy
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r87168 | murf | 2007-10-26 10:34:02 -0600 (Fri, 26 Oct 2007) | 1 line closes issue #11086 where a user complains that references to following contexts report a problem; The problem was REALLy that he was referring to empty contexts, which were being ignored. Reporter stated that empty contexts should be OK. I checked it out against extensions.conf, and sure enough, empty contexts ARE ok. So, I removed the restriction from AEL. This, though, highlighted a problem with multiple contexts of the same name. This should be OK, also. So, I added the extend keyword to AEL, and it can preceed the 'context' keyword (mixed with 'abstract', if nec.). This will turn off the warnings in AEL if the same context name is used 2 or more times. Also, I now call ast_context_find_or_create for contexts now, instead of just ast_context_create; I did this because pbx_config does this. The 'extend' keyword thus becomes a statement of intent. AEL can now duplicate the behavior of pbx_config, ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@87187 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-17and then, I noticed the clicompat stuff.Steve Murphy
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86182 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-17more stub routines to allow linkage in stand-alone environment, with thread ↵Steve Murphy
debugs turned on git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86181 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-17more stub routines to allow linkage in stand-alone environment, with thread ↵Steve Murphy
debugs turned on git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86180 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-09Remove redundant includes (patch by snuffy) (Closes issue #10922)Tilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@85140 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-08Fix up tree so that it compiles when MTX Profiling is enabled.Joshua Colp
(closes issue #10898) Reported by: snuffy Patches: 10898-mtx_prof.diff uploaded by qwell (license 4) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@85025 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-01OK. THis a DEBUG_THREADS situation.Steve Murphy
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@84331 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-01picky gcc versions... sigh.Steve Murphy
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@84330 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-01This mod will allow check_expr to compile in the presence of DEBUG_THREAD ↵Steve Murphy
situations. At least, it does for me. And it's less expensive than several other approaches I tried. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@84329 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-25Add some files to the utils directory svn:ignore and Makefile clean targetRussell Bryant
(closes issue #10808, reported by mvanbaak) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@83741 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-22Fix build of check_expr and hashtest2 when DEBUG_THREADLOCAL is definedTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@83545 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-21Merged revisions 83432 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r83432 | russell | 2007-09-21 09:37:20 -0500 (Fri, 21 Sep 2007) | 4 lines gcc 4.2 has a new set of warnings dealing with cosnt pointers. This set of changes gets all of Asterisk (minus chan_alsa for now) to compile with gcc 4.2. (closes issue #10774, patch from qwell) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@83433 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-12Change the traversal to use ao2_callback() instead of an ao2_iterator. UsingRussell Bryant
ao2_callback() is a much more efficient way of performing an operation on every item in the container. This change makes hashtest2 run in about 25% of the time it ran before on my system. In general, I would say that it makes the most sense to use an ao2_iterator if the operation being performed is going to take a long time and you don't want to keep the container locked while you work with each object. Otherwise, the use of ao2_callback is preferred. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82282 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-11This solves an unreported solaris compile problem (missing -lnsl -lsocket).Steve Murphy
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82268 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-11fixing up the pthread stuff for hashtest2Steve Murphy
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82256 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-11Include string compatibility file in hashtest2.Joshua Colp
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82235 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-11Include compat.h to hopefully make it compatible with FreeBSD.Joshua Colp
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82234 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-11Fix building under FreeBSD. Make sure alloca.h exists before including it.Joshua Colp
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82233 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-10Committing my test for astobj2, hashtest2.c, along with makefile changes in ↵Steve Murphy
utils. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82140 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-29This code was in team/murf/bug8684-trunk; it should fix bug 8684 in trunk. I ↵Steve Murphy
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: https://origsvn.digium.com/svn/asterisk/trunk@81361 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-24fix up the MODULEINFO in conf2ael.c as wellSteve Murphy
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80748 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-24Merged revisions 80722 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r80722 | russell | 2007-08-24 10:28:05 -0500 (Fri, 24 Aug 2007) | 3 lines Tweak the formatting of this MODULEINFO block. I think this would have caused a "*" to get in the menuselect-tree file. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80725 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-24Merged revisions 80717 via svnmerge from Steve Murphy
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r80717 | murf | 2007-08-24 08:48:49 -0600 (Fri, 24 Aug 2007) | 1 line This change addresses JerJer's complaint that aelparse builds and installs even if pbx_ael is unchecked in the menuselect stuff. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80718 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-22Ensure that the object code for ast_atomic_fetchadd_int() gets included in theRussell Bryant
check_expr binary when building with LOW_MEMORY defined. (reported by Brian Capouch on the asterisk-dev list, patch by me) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80262 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-20Stephn Davies reports that this will help make things work on 64-bit machinesSteve Murphy
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80075 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-20pval.c should not be in svn, in the utils dirSteve Murphy
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80037 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-20Bring pval.c in utils up to date with pval.c in res/ael.Joshua Colp
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80033 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-20(closes issue #10496)Joshua Colp
Reported by: caio1982 Fix building on OSX. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79989 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-19Add strcompat dependency for check_expr (needed for platforms that don't ↵Tilghman Lesher
have strndup) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79980 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16Many thanks to mvanbaak for his update to translate hints; I added the -d ↵Steve Murphy
option for local testing purposes. This is from bug 10472 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79736 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16mvanbaak asks: why did you include that twice? Answer: dunno. removed ↵Steve Murphy
redundant include git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79719 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16svn did me dirty for some reason. Left 5 files out of the commit; Tilghman ↵Steve Murphy
copied them in from the branch, but I had made changes to these. Here they are. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79714 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16Make conf2ael build on 64-bit systems.Joshua Colp
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79687 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-15Missing from murf's last trunk commit, which was why trunk won't compileTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79623 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-15This commit closes bug 7605, and half-closes 7638. The AEL code has been ↵Steve Murphy
redistributed/repartitioned to allow code re-use both inside and outside of Asterisk. This commit introduces the utils/conf2ael program, and an external config-file reader, for both normal config files, and for extensions.conf (context, exten, prio); It provides an API for programs outside of asterisk to use to play with the dialplan and config files. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79595 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-14Merged revisions 79255 via svnmerge from Steve Murphy
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r79255 | murf | 2007-08-13 11:49:54 -0600 (Mon, 13 Aug 2007) | 1 line This patch fixes bug 10411. I added a new regression test, some regression test cleanups ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79392 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-07Add another big set of doxygen documentation improvements from snuffy.Russell Bryant
(closes issue #9892) (closes issue #10395) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78541 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-01Merged revisions 77869 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r77869 | file | 2007-08-01 14:56:59 -0300 (Wed, 01 Aug 2007) | 2 lines Add some fixes for building on Solaris. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77870 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-17via 10206, I have added an option (e) to Dial to allow the h exten to get ↵Steve Murphy
run on peer. Had to upgrade ast_flag stuff to 64 bits to do this. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75400 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-05In regards to changes for 9508, expr2 system choking on floating point ↵Steve Murphy
numbers, I'm adding this update to round out (no pun intended) and make this FP-capable version of the Expr2 stuff interoperate better with previous integer-only usage, by providing Functions syntax, with 20 builtin functions for floating pt to integer conversions, and some general floating point math routines that might commonly be used also. Along with this, I made it so if a function was not a builtin, it will try and find it in the ast_custom_function list, and if found, execute it and collect the results. Thus, you can call system functions like CDR(), CHANNEL(), etc, from within $\[..\] exprs, without having to wrap them in $\{...\} (curly brace) notation. Did a valgrind on the standalone and made sure there's no mem leaks. Looks good. Updated the docs, too. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@73449 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-02Merged revisions 72933 via svnmerge from Steve Murphy
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r72933 | murf | 2007-07-02 14:16:31 -0600 (Mon, 02 Jul 2007) | 1 line support for floating point numbers added to ast_expr2 $\[...\] exprs. Fixes bug 9508, where the expr code fails with fp numbers. The MATH function returns fp numbers by default, so this fix is considered necessary. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@72940 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-05Merged revisions 67526 via svnmerge from Steve Murphy
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r67526 | murf | 2007-06-05 15:30:18 -0600 (Tue, 05 Jun 2007) | 1 line this fixes bug 9883, wherein macros were not allowing the includes construct. fixed and tested, looks OK. Now includes can serve as an adjunct to catch. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67529 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-22Merged revisions 59145 via svnmerge from Steve Murphy
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r59145 | murf | 2007-03-22 08:40:53 -0600 (Thu, 22 Mar 2007) | 1 line The stuff in utils was compiling with -O6 even if DONT_OPTIMIZE is set in menuconfig. Added the include to fix that ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@59146 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-02Merged revisions 57426 via svnmerge from Steve Murphy
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r57426 | murf | 2007-03-01 22:21:36 -0700 (Thu, 01 Mar 2007) | 1 line I almost had comma escapes right, but 9184 points out the problem-- the escape is removed by pbx_config, and pbx_ael should also, before sending it down into the pbx engine. Also, you have to insert it back in, if you are generating extensions.conf code from the AEL. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@57438 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-24Merged revisions 52052 via svnmerge from Steve Murphy
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r52052 | murf | 2007-01-24 11:26:22 -0700 (Wed, 24 Jan 2007) | 9 lines Merged revisions 52002 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r52002 | murf | 2007-01-24 10:43:50 -0700 (Wed, 24 Jan 2007) | 1 line updated check_expr via 8322 (refactoring of expression checking impl); elfring contributed a nice code reorg, I contributed some time to get it working again, better messages ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@52053 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-05Merged revisions 49676 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r49676 | kpfleming | 2007-01-05 16:16:33 -0600 (Fri, 05 Jan 2007) | 2 lines reduce stack consumption for AMI and AMI/HTTP requests by nearly 20K in most cases ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49678 65c4cc65-6c06-0410-ace0-fbb531ad65f3