Commit Graph

177 Commits

Author SHA1 Message Date
Luigi Rizzo 1c55f8424e Move AUDIO_LIBS outside the top level Makefile. This too is used only
in one place.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@88770 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-05 21:36:11 +00:00
Tilghman Lesher e8c781b215 Add pbx_lua as a method of doing extensions
Reported by: mnicholson
Patch by: mnicholson
Closes issue #11140


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@88250 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-02 15:36:34 +00:00
Steve Murphy 63f2f04cf4 This commits the performance mods that give the priority processing engine 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-01 22:26:51 +00:00
Russell Bryant cac97aa8b4 Remove another copied source file on "make clean".
(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-11-01 15:18:06 +00:00
Kevin P. Fleming 6ab27c871a UGH... while trying to fix #10995, I found all kinds of cruft in this 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-29 22:44:49 +00:00
Kevin P. Fleming a4b8ca220d clean up assembler and preprocessor files if they are here too
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@87467 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-29 22:24:44 +00:00
Steve Murphy c9f3efc381 Merged revisions 87168 via svnmerge from
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-26 17:39:39 +00:00
Steve Murphy a69abc0179 and then, I noticed the clicompat stuff.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86182 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-17 20:06:28 +00:00
Steve Murphy e5fa15d812 more stub routines to allow linkage in stand-alone environment, with thread debugs turned on
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86181 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-17 19:59:49 +00:00
Steve Murphy 65786f15fa more stub routines to allow linkage in stand-alone environment, with thread debugs turned on
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86180 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-17 19:58:20 +00:00
Tilghman Lesher 7adbd6bb16 Remove redundant includes (patch by snuffy) (Closes issue #10922)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@85140 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-09 16:04:41 +00:00
Joshua Colp 648f67d4c8 Fix up tree so that it compiles when MTX Profiling is enabled.
(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-08 16:12:21 +00:00
Steve Murphy 0d2ee300e7 OK. THis a DEBUG_THREADS situation.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@84331 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-01 23:33:07 +00:00
Steve Murphy e8c8bb4a14 picky gcc versions... sigh.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@84330 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-01 23:26:50 +00:00
Steve Murphy db26685460 This mod will allow check_expr to compile in the presence of DEBUG_THREAD 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-10-01 23:20:20 +00:00
Russell Bryant 437b439c61 Add some files to the utils directory svn:ignore and Makefile clean target
(closes issue #10808, reported by mvanbaak)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@83741 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-25 08:09:01 +00:00
Tilghman Lesher 1b949d24c0 Fix build of check_expr and hashtest2 when DEBUG_THREADLOCAL is defined
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@83545 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-22 14:45:42 +00:00
Russell Bryant 9f64905d4e Merged revisions 83432 via svnmerge from
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-21 14:40:10 +00:00
Russell Bryant 99fb378cdc Change the traversal to use ao2_callback() instead of an ao2_iterator. Using
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-12 15:53:40 +00:00
Steve Murphy c88e216a14 This solves an unreported solaris compile problem (missing -lnsl -lsocket).
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82268 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-11 22:37:20 +00:00
Steve Murphy 26d739ff5b fixing up the pthread stuff for hashtest2
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82256 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-11 17:16:16 +00:00
Joshua Colp 56a31d1d20 Include string compatibility file in hashtest2.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82235 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-11 13:46:08 +00:00
Joshua Colp c81d14226a Include compat.h to hopefully make it compatible with FreeBSD.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82234 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-11 13:41:03 +00:00
Joshua Colp 219470dc43 Fix building under FreeBSD. Make sure alloca.h exists before including it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82233 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-11 13:37:26 +00:00
Steve Murphy c4133cc03f Committing my test for astobj2, hashtest2.c, along with makefile changes in utils.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82140 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-10 16:59:18 +00:00
Steve Murphy b5cd67adc3 This code was in team/murf/bug8684-trunk; it should fix bug 8684 in trunk. I 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-29 20:55:40 +00:00
Steve Murphy 088d7ef8bc fix up the MODULEINFO in conf2ael.c as well
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80748 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-24 15:42:25 +00:00
Russell Bryant 6814e7b77e Merged revisions 80722 via svnmerge from
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-24 15:29:16 +00:00
Steve Murphy 6419bd36ba Merged revisions 80717 via svnmerge from
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-24 14:55:34 +00:00
Russell Bryant 483c2bad07 Ensure that the object code for ast_atomic_fetchadd_int() gets included in the
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-22 16:27:39 +00:00
Steve Murphy b69734ae09 Stephn Davies reports that this will help make things work on 64-bit machines
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80075 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-20 17:37:36 +00:00
Steve Murphy a9f86a939e pval.c should not be in svn, in the utils dir
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80037 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-20 15:27:35 +00:00
Joshua Colp 4edcf623f0 Bring pval.c in utils up to date with pval.c in res/ael.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80033 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-20 15:10:55 +00:00
Joshua Colp ab2c114cd7 (closes issue #10496)
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-20 00:38:20 +00:00
Tilghman Lesher 488f6973cd Add strcompat dependency for check_expr (needed for platforms that don't have strndup)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79980 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-19 14:17:30 +00:00
Steve Murphy c0060cd99a Many thanks to mvanbaak for his update to translate hints; I added the -d 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-16 19:40:28 +00:00
Steve Murphy c33e2ec2ae mvanbaak asks: why did you include that twice? Answer: dunno. removed redundant include
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79719 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16 17:34:50 +00:00
Steve Murphy c11e482cc8 svn did me dirty for some reason. Left 5 files out of the commit; Tilghman 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-16 16:50:58 +00:00
Joshua Colp b10671b0b8 Make conf2ael build on 64-bit systems.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79687 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16 15:27:33 +00:00
Tilghman Lesher 918348f03c Missing from murf's last trunk commit, which was why trunk won't compile
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79623 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-15 21:25:13 +00:00
Steve Murphy 9836efb5fb This commit closes bug 7605, and half-closes 7638. The AEL code has been 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-15 19:21:27 +00:00
Steve Murphy d9b52497f0 Merged revisions 79255 via svnmerge from
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-14 14:32:21 +00:00
Russell Bryant 668a334f85 Add another big set of doxygen documentation improvements from snuffy.
(closes issue #9892)
(closes issue #10395)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78541 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-07 23:04:01 +00:00
Joshua Colp d9aee5e353 Merged revisions 77869 via svnmerge from
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-08-01 18:01:33 +00:00
Steve Murphy 8a7732f067 via 10206, I have added an option (e) to Dial to allow the h exten to get 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-17 19:40:29 +00:00
Steve Murphy 6a4efe5d5a In regards to changes for 9508, expr2 system choking on floating point 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-05 18:15:22 +00:00
Steve Murphy 94b934c8f6 Merged revisions 72933 via svnmerge from
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-07-02 21:50:15 +00:00
Steve Murphy 52efde5c65 Merged revisions 67526 via svnmerge from
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-06-05 22:04:22 +00:00
Steve Murphy 1613b4e58e Merged revisions 59145 via svnmerge from
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-22 14:48:09 +00:00
Steve Murphy 91a9b97a73 Merged revisions 57426 via svnmerge from
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-03-02 05:57:06 +00:00