summaryrefslogtreecommitdiff
path: root/utils
AgeCommit message (Collapse)Author
2009-04-21Merged revisions 189664 via svnmerge from Doug Bailey
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r189664 | dbailey | 2009-04-21 10:52:13 -0500 (Tue, 21 Apr 2009) | 2 lines Remove daemon call on systems that do not support forking. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@189665 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-14Application delimiter is ',', not '|'.Tilghman Lesher
(closes issue #14881) Reported by: stegro Patches: smsq.patch uploaded by stegro (license 752) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@188206 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
2009-02-24Use a SIGPIPE to kill the process, instead of depending upon the astcanary ↵Tilghman Lesher
process being inherited by init. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@178342 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-24Cause astcanary to exit if Asterisk exits abnormally and doesn't kill astcanary.Tilghman Lesher
Also, add some documentation supporting the use of astcanary. (closes issue #14538) Reported by: KNK Patches: asterisk-1.6.x-astcanary.diff uploaded by KNK (license 545) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@178303 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-21This patch corrects a segfault reported in 14289,Steve Murphy
due to a null ptr being refd. Yes, seanbright is right in the bug comments, that is the fix. Sorry for this oversight; I guess my personal usage didn't have this happen! murf (closes issue #14289) Reported by: jamesgolovich git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@169673 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-17This patch is here committed to satisfy theSteve Murphy
buildbot, who has a problem with the const. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@165254 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-16Add timezone to the possible fields in a timespec.Tilghman Lesher
(closes issue #14028) Reported by: mostyn Patches: timezone-v2.patch uploaded by mostyn (license 398) (with additional code guideline fixes and a memory leak fix by me - license 14) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164976 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-12-01Pay attention to the return value of system(), even if we basically ignore it.Sean Bright
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@160170 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-29incorporates r159808 from branches/1.4:Kevin P. Fleming
------------------------------------------------------------------------ r159808 | kpfleming | 2008-11-29 10:58:29 -0600 (Sat, 29 Nov 2008) | 7 lines update dev-mode compiler flags to match the ones used by default on Ubuntu Intrepid, so all developers will see the same warnings and errors since this branch already had some printf format attributes, enable checking for them and tag functions that didn't have them format attributes in a consistent way ------------------------------------------------------------------------ in addition: move some format attributes from main/utils.c to the header files they belong in, and fix up references to the relevant functions based on new compiler warnings git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@159818 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-11-25This is basically a complete rollback of r155401, as it was determined thatSean Bright
it would be best to maintain API compatibility. Instead, this commit introduces ao2_callback_data() which is functionally identical to ao2_callback() except that it allows you to pass arbitrary data to the callback. Reviewed by Mark Michelson via ReviewBoard: http://reviewboard.digium.com/r/64 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@158959 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-07Add ability to pass arbitrary data to the ao2_callback_fn (called fromSean Bright
ao2_callback and ao2_find). Currently, passing OBJ_POINTER to either of these mandates that the passed 'arg' is a hashable object, making searching for an ao2 object based on outside criteria difficult. Reviewed by Russell and Mark M. via ReviewBoard: http://reviewboard.digium.com/r/36/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@155401 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-06don't blindly assume that Darwin and Cygwin need GLOB_ABORTED defined; only ↵Kevin P. Fleming
define it if it is not already defined git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@155121 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-02bring over all the fixes for the warnings found by gcc 4.3.x from the 1.4 ↵Kevin P. Fleming
branch, and add the ones needed for all the new code here too git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@153616 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-30fix a few small things found by using sparseKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@152809 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-09(closes issue #13557)Steve Murphy
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: https://origsvn.digium.com/svn/asterisk/trunk@147807 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-10-05Make this build on my mac.Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@146514 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-09-26Matt suggests we remove utils/build-extensions-conf.lua, as per bug 12961, ↵Steve Murphy
it is no longer necessary. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@144635 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-29Merged revisions 140488 via svnmerge from Mark Michelson
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: https://origsvn.digium.com/svn/asterisk/trunk@140489 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-19Oops. put a decl in a generated file. My bad, but fixed now.Steve Murphy
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@138845 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-07More merges from resolve-shadow warnings:Sean Bright
utils/ codecs/ and a change I missed from formats/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@136408 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-11Fix trunk breakageTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@130230 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-11Janitor patch to change uses of sizeof to ARRAY_LENBrett Bryant
(closes issue #13054) Reported by: pabelanger Patches: ARRAY_LEN.patch2 uploaded by pabelanger (license 224) Tested by: seanbright git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@130129 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-06-12Goodbye Zaptel, hello DAHDI. Removes Zaptel driver support with DAHDI. ↵Jeff Peeler
Configuration file and dialplan backwards compatability has been put in place where appropiate. Release announcement to follow. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@122234 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-03Add lock tracking for rwlocks. Previously, lock.h only had the ability toRussell Bryant
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: https://origsvn.digium.com/svn/asterisk/trunk@120064 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-29Avoid build warning when execinfo.h isn't available.Sean Bright
(closes issue #12751) Reported by: ys Patches: check_expr.diff uploaded by ys (license 281) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@118911 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-28Fix a linkage error related to the lock backtrace supportRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@118695 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-23A new feature thanks to the fine folks at Switchvox!Mark Michelson
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: https://origsvn.digium.com/svn/asterisk/trunk@118173 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-21This change makes it so that logs will report the correct source of verbose ↵Mark Michelson
messages. Until this change, all verbose messages in Asterisk's log files reported logger.c as the source of the message. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@117693 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-21These changes were made via the comments atis_work made at 4:30am (Mountain ↵Steve Murphy
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: https://origsvn.digium.com/svn/asterisk/trunk@117335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-18Add a set of text to the file astcanary uses to communicate back the mainTilghman Lesher
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: https://origsvn.digium.com/svn/asterisk/trunk@116948 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-06Get refcounter to build with LOW_MEMORY definedMark Michelson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@115473 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-18Go through and fix a bunch of places where character strings were being ↵Terry Wilson
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: https://origsvn.digium.com/svn/asterisk/trunk@109447 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18Merged revisions 109309 via svnmerge from Steve Murphy
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: https://origsvn.digium.com/svn/asterisk/trunk@109357 65c4cc65-6c06-0410-ace0-fbb531ad65f3