aboutsummaryrefslogtreecommitdiffstats
path: root/utils
AgeCommit message (Collapse)AuthorFilesLines
2008-10-09(closes issue #13557)murf1-1/+1
Reported by: nickpeirson Patches: pbx.c.patch uploaded by nickpeirson (license 579) replace_bzero+bcopy.patch uploaded by nickpeirson (license 579) Tested by: nickpeirson, murf 1. replaced all refs to bzero and bcopy to memset and memmove instead. 2. added a note to the CODING-GUIDELINES 3. add two macros to asterisk.h to prevent bzero, bcopy from creeping back into the source 4. removed bzero from configure, configure.ac, autoconfig.h.in git-svn-id: http://svn.digium.com/svn/asterisk/trunk@147807 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-08When echoing our copies, strip off ASTTOPDIR from the front of the source file.seanbright1-13/+13
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@147456 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-06Make NOISY_BUILD work for the calls to cp in utils/Makefileseanbright1-13/+27
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@146597 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-06Quote arguments to cp so we can handle spaces in our paths.seanbright1-12/+12
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@146555 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-05Make this build on my mac.russell1-0/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@146514 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-27remove incorrect commentkpfleming1-1/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@144951 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-27fix bugs caused by r144949 when MALLOC_DEBUG is definedkpfleming1-22/+14
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@144950 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-27Merged revisions 144924-144925 via svnmerge from kpfleming4-87/+19
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: http://svn.digium.com/svn/asterisk/trunk@144949 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-26Matt suggests we remove utils/build-extensions-conf.lua, as per bug 12961, ↵murf1-81/+0
it is no longer necessary. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@144635 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-29Merged revisions 140488 via svnmerge from mmichelson1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r140488 | mmichelson | 2008-08-29 12:34:17 -0500 (Fri, 29 Aug 2008) | 22 lines After working on the ao2_containers branch, I noticed something a bit strange. In all cases where we provide a callback function to ao2_container_alloc, the callback function would only return 0 or CMP_MATCH. After inspecting the ao2_callback() code carefully, I found that if you're only looking for one specific item, then you should return CMP_MATCH | CMP_STOP. Otherwise, astobj2 will continue traversing the current bucket until the end searching for more matches. In cases like chan_iax2 where in 1.4, all the peers are shoved into a single bucket, this makes for potentially terrible performance since the entire bucket will be traversed even if the peer is one of the first ones come across in the bucket. All the changes I have made were for cases where the callback function defined was passed to ao2_container_alloc so that calls to ao2_find could find a unique instance of whatever object was being stored in the container. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@140489 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-19Oops. put a decl in a generated file. My bad, but fixed now.murf2-0/+3
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@138845 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-07More merges from resolve-shadow warnings:seanbright5-69/+68
utils/ codecs/ and a change I missed from formats/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@136408 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-11Fix trunk breakagetilghman1-0/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@130230 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-11Janitor patch to change uses of sizeof to ARRAY_LENbbryant1-2/+2
(closes issue #13054) Reported by: pabelanger Patches: ARRAY_LEN.patch2 uploaded by pabelanger (license 224) Tested by: seanbright git-svn-id: http://svn.digium.com/svn/asterisk/trunk@130129 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-27Remove an unneeded target from the Makefilemmichelson1-1/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@125799 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-12Goodbye Zaptel, hello DAHDI. Removes Zaptel driver support with DAHDI. ↵jpeeler1-1/+1
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-03Add lock tracking for rwlocks. Previously, lock.h only had the ability torussell2-0/+12
hold tracking information for mutexes. Now, the "core show locks" output will output information about who is holding a rwlock when a thread is waiting on it. (closes issue #11279) Reported by: ys Patches: trunk_lock_utils.v8.diff uploaded by ys (license 281) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@120064 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-29Avoid build warning when execinfo.h isn't available.seanbright1-7/+7
(closes issue #12751) Reported by: ys Patches: check_expr.diff uploaded by ys (license 281) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@118911 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-28Fix a linkage error related to the lock backtrace supportrussell1-0/+7
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@118695 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-23A new feature thanks to the fine folks at Switchvox!mmichelson6-8/+100
If a deadlock is detected, then the typical lock information will be printed along with a backtrace of the stack for the offending threads. Use of this requires compiling with DETECT_DEADLOCKS and having glibc installed. Furthermore, issuing the "core show locks" CLI command will print the normal lock information as well as a backtraces for each lock. This requires that DEBUG_THREADS is enabled and that glibc is installed. All the backtrace features may be disabled by running the configure script with --without-execinfo as an argument git-svn-id: http://svn.digium.com/svn/asterisk/trunk@118173 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-21This change makes it so that logs will report the correct source of verbose ↵mmichelson4-4/+4
messages. Until this change, all verbose messages in Asterisk's log files reported logger.c as the source of the message. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@117693 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-21These changes were made via the comments atis_work made at 4:30am (Mountain ↵murf1-34/+4
Time zone- US) in #asterisk-dev on 20 May 2008. He noted that a backslash was being inserted before commas in app call arguments in the extensions.conf.aeldump file that you get from aelparse with the -w arg. This was being generated from code left over from 1.4, where commas were substituted with '|', and any remaining commas needed to be escaped. Many thanks to atis for his comment; please let us know if these changes break anything! git-svn-id: http://svn.digium.com/svn/asterisk/trunk@117335 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-18Add a set of text to the file astcanary uses to communicate back the maintilghman1-2/+18
Asterisk process, which explains the purpose for the file being there. This should assist people who find the file and wonder why it exists. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@116948 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-06Get refcounter to build with LOW_MEMORY definedmmichelson1-1/+4
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@115473 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-16Introducing various astobj2 enhancements, chief being a refcount tracing ↵murf2-2/+274
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: http://svn.digium.com/svn/asterisk/trunk@114175 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-10Merged revisions 114051 via svnmerge from mmichelson7-11/+33
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: http://svn.digium.com/svn/asterisk/trunk@114052 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-18Go through and fix a bunch of places where character strings were being ↵twilson4-11/+14
interpreted as format strings. Most of these changes are solely to make compiling with -Wsecurity and -Wformat=2 happy, and were not actual problems, per se. I also added format attributes to any printf wrapper functions I found that didn't have them. -Wsecurity and -Wmissing-format-attribute added to --enable-dev-mode. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@109447 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-18Merged revisions 109309 via svnmerge from murf3-11/+9
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r109309 | murf | 2008-03-18 00:37:15 -0600 (Tue, 18 Mar 2008) | 17 lines (closes issue #11903) Reported by: atis Many thanks to atis for spotting this problem and reporting it. The fix was to straighten out how items are placed on and removed from the file stack. Regressions as well as the provided test case helped to straighten out all code paths. valgrind was used to make sure all memory allocated was freed. Sorry for not solving this earlier. I got distracted. Added the ntest23 regression test, which is mainly a copy of ntest22, but with a few juicy errors thrown in, to replicate the kind of error that atis spotted. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@109357 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-11Merged revisions 107352 via svnmerge from kpfleming1-2/+2
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: http://svn.digium.com/svn/asterisk/trunk@107373 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-07(closes issue #6002)murf4-750/+812
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
2008-03-07Merged revisions 106552 via svnmerge from tilghman1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r106552 | tilghman | 2008-03-07 00:36:33 -0600 (Fri, 07 Mar 2008) | 6 lines Safely use the strncat() function. (closes issue #11958) Reported by: norman Patches: 20080209__bug11958.diff.txt uploaded by Corydon76 (license 14) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@106553 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-28Merged revisions 105116 via svnmerge from russell1-2/+2
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r105116 | russell | 2008-02-28 16:23:05 -0600 (Thu, 28 Feb 2008) | 8 lines Fix a bug in the lock tracking code that was discovered by mmichelson. The issue is that if the lock history array was full, then the functions to mark a lock as acquired or not would adjust the stats for whatever lock is at the end of the array, which may not be itself. So, do a sanity check to make sure that we're updating lock info for the proper lock. (This explains the bizarre stats on lock #63 in BE-396, thanks Mark!) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@105144 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-27open(2) needs a mode argument when O_CREAT is specified.tilghman1-1/+1
(Closes issue #12083) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@104534 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-21Ignore some more unused generated events.tilghman1-1/+10
(closes issue #12042) Reported by: junky Patches: astman_events.diff uploaded by junky (license 177) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@104014 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-15Remove extraneous copytilghman1-2/+0
(closes issue #12002) Reported by: junky Patches: conf2ael.diff uploaded by junky (license 177) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@103716 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-04Merged revisions 102323 via svnmerge from tilghman1-1/+7
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r102323 | tilghman | 2008-02-04 15:06:09 -0600 (Mon, 04 Feb 2008) | 7 lines Cross-platform fix: OS X now deprecates the use of the daemon(3) API. (closes issue #11908) Reported by: oej Patches: 20080204__bug11908.diff.txt uploaded by Corydon76 (license 14) Tested by: Corydon76 ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@102329 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-10The fixes in this commit are mainly to allow compiling of trunk with ↵murf1-1/+1
--enable-dev-mode, mutex profiling, lock debugging, etc. Mainly, the version.c needs to be in the OBJS line; asterisk.h was chosen to have the prototypes for ast_get_version, ast_get_version_num; and the ASTERISK_FILE_VERSION macro needs to be used after including asterisk.h in a few files. I hope I did the right thing. If not, let me know. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@97656 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-08Make ast_atomic_fetchadd_int_slow magically appear in extconf.file1-3/+8
(closes issue #11703) Reported by: dmartin git-svn-id: http://svn.digium.com/svn/asterisk/trunk@97041 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-20modify http://svn.digium.com/view/asterisk?view=rev&rev=93603rizzo3-14/+12
so that paths and filename are writable by asterisk.c without causing segfaults. This involves defining the variables as const char *, and having them point to as static, writable buffer defined in asterisk.c On passing, fix some errors in using these variables in some files in utils/ , and in res/snmp/agent.c which was redefining a variable without using paths.h (not applicable to 1.4) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@94168 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-18Add a canary process, for high priority mode (asterisk -p) to ensure that iftilghman2-1/+85
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: http://svn.digium.com/svn/asterisk/trunk@93804 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-18make configuration variable const so they are not accidentallyrizzo3-9/+9
modified. This requires casting the strings in asterisk.c when writing to them, so we do it through a macro to do it consistently. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@93603 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-18remove unnecessary (char *) casts for ast_config_AST_* variables.rizzo1-1/+1
There are some left in the .flex files, left to the maintainer... git-svn-id: http://svn.digium.com/svn/asterisk/trunk@93582 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-10Add ast_atomic_fetchadd_int_slow to check_expr for platforms that need it.file1-0/+8
(closes issue #11484) Reported by: snuffy git-svn-id: http://svn.digium.com/svn/asterisk/trunk@92206 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-10remove relative paths and use ASTTOPDIR instead.rizzo1-25/+26
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: http://svn.digium.com/svn/asterisk/trunk@92104 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-10simplify this filerizzo1-6/+6
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@92103 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-09add hashtab.c to the list of files deletedrizzo1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@92042 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-09normalize subdirs' Makefile by using ASTTOPDIR and not .. to referencerizzo1-1/+1
the top level directory. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@92022 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-08normalize header order, and add a comment on the needrizzo1-2/+10
to clean up this file. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@91930 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-04Fix the build of astman. Any file that includes any asterisk sub-headersrussell1-1/+3
needs to first include asterisk.h. (closes issue #11394) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@91029 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-29let's try this again... *all* compilation and linking in Asterisk should be ↵kpfleming2-19/+13
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: http://svn.digium.com/svn/asterisk/trunk@90150 f38db490-d61c-443f-a65b-d21fe96a405b