summaryrefslogtreecommitdiff
path: root/utils/Makefile
AgeCommit message (Collapse)Author
2015-03-28clang compiler warnings: Fix -Wparantheses-equality warningsMatthew Jordan
Clang will treat ((a == b)) as a warning, as it reasonably expects that the developer may have intended to write (a == b) or ((a = b)). This patch cleans up all instances where equality, not assignment, was intended between two parantheses. Review: https://reviewboard.asterisk.org/r/4531/ ASTERISK-24917 Repoted by: dkdegroot patches: rb4531.patch submitted by dkdegroot (License 6600) ........ Merged revisions 433687 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433688 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-11utils dir: Remove no longer needed traces of refcounter except in the clean ↵Richard Mudgett
make target. * Removed no longer needed files from the svn:ignore property to make them visible. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@412213 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-21Make the AEL load process less chatty.Sean Bright
Switched a bunch of LOG_NOTICEs to ast_debug. This time without breaking the build. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410994 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-02Move ast_str_container_alloc and friendsKinsey Moore
This moves ast_str_container_alloc, ast_str_container_add, ast_str_container_remove, and related private functions into strings.c/h since they really don't belong in astobj2.c/h. As a result of this move, utils also had to be updated. Review: https://reviewboard.asterisk.org/r/2719/ (closes issue ASTERISK-22041) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396105 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-02Update utils Makefile to handle r387294Matthew Jordan
Alec's patch that added the Asterisk version to 'core show locks' angered the items in utils, as they exist somewhat outside of the Asterisk build system. Some day, this Makefile should get nuked from high orbit, but for now, include version.c in its list of stuff to pile in. ........ Merged revisions 387421 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 387422 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387423 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-16Migrate hashtest/hashtest2 to be unit tests.David M. Lee
Both hashtest and hashtest2 are manual testing apps that thrash hash tables (hashtab and ao2 containers, respectively), by spinning up several threads that randomly insert, delete, lookup and iterate over the hash table. If the app doesn't crash, the hash table probably passes the test. Those utils are not a part of the typical Asterisk build, so they do not usually get compiled. This all makes them less that useful. This patch removes those manual test programs and replaces them with Asterisk unit test modules (test_{hashtab,astobj2}_thrash.so). It also attempts to make the tests more deterministic. * Rather than spinning up some number of threads that operate on the hash table randomly, spin up four threads that concurrenly add, remove, lookup and iterate over the hash table. * Each thread checks the state of the hash table both during and after execution, and indicates a test failure if things are not as expected. * Each thread times out after 60 seconds to prevent deadlocking the unit test run. (closes issue ASTERISK-20505) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/2189/ ........ Merged revisions 376306 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 376315 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 376339 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376341 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-14Title updateAndrew Latham
Update title that was left behind many years ago. Used revision 6596 as my guide for what it should be. (issue ASTERISK-20259) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375007 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-10Merged revisions 340219-340220 via svnmerge from Terry Wilson
https://origsvn.digium.com/svn/asterisk/branches/10 ........ r340219 | twilson | 2011-10-10 15:38:06 -0700 (Mon, 10 Oct 2011) | 8 lines Add astdb conversion utility for Berkeley to SQLite 3 If someone wants to backtrack from Asterisk 1.8 to 10 they can use the astdb2bdb utility to convert the database back to the Berkeley format that Asterisk 1.8 uses. Review: https://reviewboard.asterisk.org/r/1502/ ........ r340220 | twilson | 2011-10-10 15:39:41 -0700 (Mon, 10 Oct 2011) | 2 lines Add a missing file for the astdb2bdb conversion utility ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@340221 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-17Merged revisions 332369 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r332369 | tilghman | 2011-08-17 14:24:59 -0500 (Wed, 17 Aug 2011) | 17 lines Merged revisions 332355 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r332355 | tilghman | 2011-08-17 14:21:36 -0500 (Wed, 17 Aug 2011) | 10 lines Re-add support for spaces in pathnames, including now spaces in DESTDIR. This was initially added to 1.8 prior to release, primarily to support the standard paths on Mac OS X, but was partially reverted recently in Subversion, due to the lack of support for spaces in DESTDIR. This commit restores support for the standard paths on Mac OS X, and also includes support for spaces in DESTDIR. (closes issue ASTERISK-18290) Reported by: pabelanger Review: https://reviewboard.asterisk.org/r/1326/ ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@332388 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-06Replace Berkeley DB with SQLite 3Terry Wilson
There were some bugs in the very ancient version of Berkeley DB that Asterisk used. Instead of spending the time tracking down the bugs in the Berkeley code we move to the much better documented SQLite 3. Conversion of the old astdb happens at runtime by running the included astdb2sqlite3 utility. The ast_db API with SQLite 3 backend should behave identically to the old Berkeley backend, but in the future we could offer a much more robust interface. We do not include the SQLite 3 library in the source tree, but instead rely upon the distribution-provided libraries. SQLite is so ubiquitous that this should not place undue burden on administrators. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@326589 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-22Make utils/ stuff *actually* compile this time.Jason Parker
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@258674 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-22Let utils/ dir compile when DEBUG_THREADS is not enabled.Jason Parker
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@258673 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-25Merged revisions 254800 via svnmerge from Jason Parker
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r254800 | qwell | 2010-03-25 15:41:15 -0500 (Thu, 25 Mar 2010) | 1 line Don't remove local copies of utils in uninstall. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@254802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-16Merged revisions 252766 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r252766 | russell | 2010-03-16 14:00:43 -0500 (Tue, 16 Mar 2010) | 6 lines Don't treat warnings as errors for muted. muted supports OS X, but uses functions marked as deprecated in 10.6. However, the functions are still supported, so just ignore the warnings for now and allow the build to proceed. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@252767 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-22Add the programs in utils/ to menuselect.Sean Bright
Nothing in utils/ is now built by default except for astcanary. Review: https://reviewboard.asterisk.org/r/353/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@225440 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-21Merged revisions 207647 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r207647 | kpfleming | 2009-07-21 08:04:44 -0500 (Tue, 21 Jul 2009) | 12 lines Ensure that user-provided CFLAGS and LDFLAGS are honored. This commit changes the build system so that user-provided flags (in ASTCFLAGS and ASTLDFLAGS) are supplied to the compiler/linker *after* all flags provided by the build system itself, so that the user can effectively override the build system's flags if desired. In addition, ASTCFLAGS and ASTLDFLAGS can now be provided *either* in the environment before running 'make', or as variable assignments on the 'make' command line. As a result, the use of COPTS and LDOPTS is no longer necessary, so they are no longer documented, but are still supported so as not to break existing build systems that supply them when building Asterisk. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@207680 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-09Merged revisions 187300-187301 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r187300 | tilghman | 2009-04-08 23:31:38 -0500 (Wed, 08 Apr 2009) | 3 lines Add debugging mode for diagnosing file descriptor leaks. (Related to issue #14625) ........ r187301 | tilghman | 2009-04-08 23:32:40 -0500 (Wed, 08 Apr 2009) | 2 lines Oops, missed this file in the last commit. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@187302 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-25Fix build issues on Mac OSX.Russell Bryant
(closes issue #14714) Reported by: ygor git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@184147 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-11Fix malloc debug macros to work properly with h323.Jeff Peeler
The main problem here was that cstdlib was undefining free thereby causing the proper debug macros to not be used. ast_h323.cxx has been changed to call ast_free instead to avoid the issue. A few other issues were addressed: - There were a few instances of functions improperly passing ast_free instead of ast_free_ptr. - Some clean up was done to avoid the debug macros intentionally being redefined. (copied below from Kevin's commit, appreciate the help) - disable astmm.h from doing anything when STANDALONE is defined, which is used by the tools in the utils/ directory that use parts of Asterisk header files in hackish ways; also ensure that utils/extconf.c and utils/conf2ael.c are compiled with STANDALONE defined. (closes issue #13593) Reported by: pj git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@181135 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-03My bad! left check_expr2 in the ALL_UTILS list by mistake. Already done to 1.6.xSteve Murphy
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@180079 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-03Merged revisions 179807 via svnmerge from Steve Murphy
https://origsvn.digium.com/svn/asterisk/branches/1.4 I had some work to do to port these changes to trunk; the check_expr stuff hasn't been updated here for quite some time, it appears. I added some more tests to the check_expr2 suite. I had to play around with the makefile a bit, etc. I added STANDALONE2 #ifdefs to ast_expr2.y so as not to conflict structure with aelparse. ........ r179807 | murf | 2009-03-03 11:11:34 -0700 (Tue, 03 Mar 2009) | 19 lines These changes allow AEL to better check ${} constructs within $[...], that are concatenated with text. I modified and added rules in ast_expr2.fl to better handle the concatenations. I added some default routines to ast_expr2.y so the standalone would compile. It also looks like I haven't run this thru bison since 2.1, so it's good to get this updated. The Makefile has comments added now for check_expr2 and check_expr to explain what they are for, and how to run them. The testexpr2s stuff has been removed, in favor of check_expr2. expr2.testinput has been updated to include the two expressions that inspired these changes (from mcnobody on #asterisk this morning) The regression has been run and all looks well. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@179973 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-17A possibly "horrible fix" for a "horribly broken"Steve Murphy
situation. As stuff shifts around in the asterisk code, the miscellaneous inclusions from the standalone stuff gets broken. There's no easy fix for this situation. I made sure that everything in utils builds without problem ***AND*** that aelparse runs the regressions correctly with the following make menuselect options both on and off: DONT_OPTIMIZE DEBUG_THREADS DEBUG_CHANNEL_LOCKS MALLOC_DEBUG MTX_PROFILE DEBUG_SCHEDULER DEBUG_THREADLOCALS DETECT_DEADLOCKS CHANNEL_TRACE I think from now on, I'm going to #undef all these features in the various utils native files; I guess I could do the same for the copied-in files, surrounded by STANDALONE ifdef. A standalone isn't going to care about threads, mutexes, etc. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@165071 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-13Merge ast_str_opaque branch (discontinue usage of ast_str internals)Tilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@163991 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-26Merged revisions 159476 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r159476 | kpfleming | 2008-11-26 12:36:24 -0600 (Wed, 26 Nov 2008) | 7 lines simplify (and slightly bug-fix) the recent developer-oriented COMPILE_DOUBLE mode ensure that 'make clean' removes dependency files for .i files that are created in COMPILE_DOUBLE mode ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@159534 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-08When echoing our copies, strip off ASTTOPDIR from the front of the source file.Sean Bright
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@147456 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-06Make NOISY_BUILD work for the calls to cp in utils/MakefileSean Bright
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@146597 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-06Quote arguments to cp so we can handle spaces in our paths.Sean Bright
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@146555 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-27remove incorrect commentKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@144951 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-27fix bugs caused by r144949 when MALLOC_DEBUG is definedKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@144950 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-27Merged revisions 144924-144925 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r144924 | kpfleming | 2008-09-27 10:00:48 -0500 (Sat, 27 Sep 2008) | 6 lines improve header inclusion process in a few small ways: - it is no longer necessary to forcibly include asterisk/autoconfig.h; every module already includes asterisk.h as its first header (even before system headers), which serves the same purpose - astmm.h is now included by asterisk.h when needed, instead of being forced by the Makefile; this means external modules will build properly against installed headers with MALLOC_DEBUG enabled - simplify the usage of some of these headers in the AEL-related stuff in the utils directory ........ r144925 | kpfleming | 2008-09-27 10:13:30 -0500 (Sat, 27 Sep 2008) | 2 lines fix some minor issues with rev 144924 ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@144949 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-27Remove an unneeded target from the MakefileMark Michelson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@125799 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-16Introducing various astobj2 enhancements, chief being a refcount tracing ↵Steve Murphy
feature, and various documentation updates in astobj2.h, and the addition of standalone utility, refcounter, that will filter the trace output for unbalanced, unfreed objects. This comes from the team/murf/bug11210 branch. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114175 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-10Merged revisions 114051 via svnmerge from Mark Michelson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r114051 | mmichelson | 2008-04-10 15:59:49 -0500 (Thu, 10 Apr 2008) | 3 lines Fix 1.4 build when LOW_MEMORY is enabled. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-11Merged revisions 107352 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r107352 | kpfleming | 2008-03-11 06:04:29 -0500 (Tue, 11 Mar 2008) | 11 lines fix up various compiler warnings found with gcc-4.3: - the output of flex includes a static function called 'input' that is not used, so for the moment we'll stop having the compiler tell us about unused variables in the flex source files (a better fix would be to improve our flex post-processing to remove the unused function) - main/stdtime/localtime.c makes assumptions about signed integer overflow, and gcc-4.3's improved optimizer tries to take advantage of handling potential overflow conditions at compile time; for now, suppress these optimizations until we can fiure out if the code needs improvement - main/udptl.c has some references to uninitialized variables; in one case there was no bug, but in the other it was certainly possibly for unexpected behavior to occur - main/editline/readline.c had an unused variable ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107373 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-07(closes issue #6002)Steve Murphy
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: https://origsvn.digium.com/svn/asterisk/trunk@106757 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-18Add a canary process, for high priority mode (asterisk -p) to ensure that ifTilghman Lesher
Asterisk goes into a busy loop, the machine will be recoverable. We'd still need to do a restart to put Asterisk back into high priority mode, but at least a reboot won't be required. (Closes issue #11559) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93804 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-10remove relative paths and use ASTTOPDIR instead.Luigi Rizzo
Give a default value to ASTTOPDIR if unset so we can at least do a 'make clean' without too much trouble. The proper fix, however, is to partition the top level Makefile in a 'setup' and a 'main' part, in a way that the 'setup' part can be included from subdirs' Makefiles and allow targets to be built without going through the top level Makefile. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92104 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-09add hashtab.c to the list of files deletedLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-09normalize subdirs' Makefile by using ASTTOPDIR and not .. to referenceLuigi Rizzo
the top level directory. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92022 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-29let's try this again... *all* compilation and linking in Asterisk should be ↵Kevin P. Fleming
done using the standard compilation rules, not manually created ones. changing hashtest.c to use these rules caused the compiler to notice a large number of coding guidelines violations, so those are fixed too. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@90150 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-21enable support for stack backtrace for stuff built in utils/Luigi Rizzo
(this was present in the main tree but forgotten here). git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89506 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-17more cygwin/mingw32 compatibility fixesLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89373 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-12(closes issue #11221)Kevin P. Fleming
Reported by: eliel Patches: utils.Makefile.patch uploaded by eliel (modified by me) (license 64) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89190 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-09This is the perhaps the biggest, boldest, most daring change I've ever ↵Steve Murphy
committed to trunk. Forgive me in advance any disruption this may cause, and please, report any problems via the bugtracker. The upside is that this can speed up large dialplans by 20 times (or more). Context, extension, and priority matching are all fairly constant-time searches. I introduce here my hashtables (hashtabs), and a regression for them. I would have used the ast_obj2 tables, but mine are resizeable, and don't need the object destruction capability. The hashtab stuff is well tested and stable. I introduce a data structure, a trie, for extension pattern matching, in which knowledge of all patterns is accumulated, and all matches can be found via a single traversal of the tree. This is per-context. The trie is formed on the first lookup attempt, and stored in the context for future lookups. Destruction routines are in place for hashtabs and the pattern match trie. You can see the contents of the pattern match trie by using the 'dialplan show' cli command when 'core set debug' has been done to put it in debug mode. The pattern tree traversal only traverses those parts of the tree that are interesting. It uses a scoreboard sort of approach to find the best match. The speed of the traversal is more a function of the length of the pattern than the number of patterns in the tree. The tree also contains the CID matching patterns. See the source code comments for details on how everything works. I believe the approach general enough that any issues that might come up involving fine points in the pattern matching algorithm, can be solved by just tweaking things. We shall see. The current pattern matcher is fairly involved, and replicating every nuance of it is difficult. If you find and report problems, I will try to resolve than as quickly as I can. The trie and hashtabs are added to the existing context and exten structs, and none of the old machinery has been removed for the sake of the multitude of functions that use them. In the future, we can (maybe) weed out the linked lists and save some space. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89129 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-05Move AUDIO_LIBS outside the top level Makefile. This too is used onlyLuigi Rizzo
in one place. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@88770 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-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