Commit Graph

314 Commits

Author SHA1 Message Date
Doug Bailey cf95f3a118 Merged revisions 189664 via svnmerge from
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-21 15:54:16 +00:00
Tilghman Lesher c5719a495c Application delimiter is ',', not '|'.
(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-14 05:27:53 +00:00
Tilghman Lesher 8f28bfc63e Merged revisions 187300-187301 via svnmerge from
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-04-09 04:59:05 +00:00
Russell Bryant 08f561f196 Fix build issues on Mac OSX.
(closes issue #14714)
Reported by: ygor


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@184147 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-25 01:42:10 +00:00
Jeff Peeler 58cf8b69da Fix malloc debug macros to work properly with h323.
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-11 04:06:44 +00:00
Steve Murphy ceea9b1dce My bad! left check_expr2 in the ALL_UTILS list by mistake. Already done to 1.6.x
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@180079 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-03 23:35:26 +00:00
Steve Murphy f47b03877b Merged revisions 179807 via svnmerge from
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-03-03 22:12:02 +00:00
Tilghman Lesher 97830cc9cb Use a SIGPIPE to kill the process, instead of depending upon the astcanary process being inherited by init.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@178342 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-24 20:06:48 +00:00
Tilghman Lesher bb2b9b1ff4 Cause astcanary to exit if Asterisk exits abnormally and doesn't kill astcanary.
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-02-24 17:51:36 +00:00
Steve Murphy d6d524741a This patch corrects a segfault reported in 14289,
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
2009-01-21 17:21:40 +00:00
Steve Murphy 834782960b This patch is here committed to satisfy the
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-17 20:50:19 +00:00
Steve Murphy 1a37ee4025 A possibly "horrible fix" for a "horribly broken"
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-17 05:04:56 +00:00
Tilghman Lesher 27cbfc1bd5 Add timezone to the possible fields in a timespec.
(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-16 22:57:17 +00:00
Tilghman Lesher c8223fc957 Merge ast_str_opaque branch (discontinue usage of ast_str internals)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@163991 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-13 08:36:35 +00:00
Sean Bright 0b1df98c19 Pay attention to the return value of system(), even if we basically ignore it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@160170 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-01 23:08:24 +00:00
Kevin P. Fleming 887e28d7aa incorporates r159808 from branches/1.4:
------------------------------------------------------------------------
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-29 17:57:39 +00:00
Kevin P. Fleming 63b031c471 Merged revisions 159476 via svnmerge from
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-26 19:08:56 +00:00
Sean Bright fd8caa1778 This is basically a complete rollback of r155401, as it was determined that
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-25 01:01:49 +00:00
Sean Bright 30d1744ffc Add ability to pass arbitrary data to the ao2_callback_fn (called from
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-07 22:39:30 +00:00
Kevin P. Fleming c054d798b8 don't blindly assume that Darwin and Cygwin need GLOB_ABORTED defined; only 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-06 22:49:19 +00:00
Kevin P. Fleming bd4eb070f3 bring over all the fixes for the warnings found by gcc 4.3.x from the 1.4 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-11-02 18:52:13 +00:00
Kevin P. Fleming 10d36d9f34 fix a few small things found by using sparse
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@152809 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-30 16:49:02 +00:00
Steve Murphy e235a07376 (closes issue #13557)
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-09 14:17:33 +00:00
Sean Bright 24c127ac19 When echoing our copies, strip off ASTTOPDIR from the front of the source file.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@147456 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-08 12:07:19 +00:00
Sean Bright 690f97870c Make NOISY_BUILD work for the calls to cp in utils/Makefile
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@146597 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-06 00:36:37 +00:00
Sean Bright f8f25ff595 Quote arguments to cp so we can handle spaces in our paths.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@146555 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-06 00:21:49 +00:00
Russell Bryant f6e73e8661 Make this build on my mac.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@146514 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-05 22:11:30 +00:00
Kevin P. Fleming d0dd58548f remove incorrect comment
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@144951 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-27 16:17:43 +00:00
Kevin P. Fleming fa2f4776a2 fix bugs caused by r144949 when MALLOC_DEBUG is defined
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@144950 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-27 16:10:33 +00:00
Kevin P. Fleming 629861a705 Merged revisions 144924-144925 via svnmerge from
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-27 15:52:56 +00:00
Steve Murphy 9022df9b66 Matt suggests we remove utils/build-extensions-conf.lua, as per bug 12961, it is no longer necessary.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@144635 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-26 16:51:30 +00:00
Mark Michelson 5dfefa5ee6 Merged revisions 140488 via svnmerge from
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-29 17:47:17 +00:00
Steve Murphy d78f79d82c Oops. put a decl in a generated file. My bad, but fixed now.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@138845 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-19 16:31:24 +00:00
Sean Bright 6305009cfc More merges from resolve-shadow warnings:
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-08-07 15:16:48 +00:00
Tilghman Lesher 9cd11917c5 Fix trunk breakage
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@130230 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-11 19:40:55 +00:00
Brett Bryant 5b7933fe5e Janitor patch to change uses of sizeof to ARRAY_LEN
(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-07-11 18:09:35 +00:00
Mark Michelson 556664b79d Remove an unneeded target from the Makefile
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@125799 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-27 14:14:09 +00:00
Jeff Peeler ef3b214728 Goodbye Zaptel, hello DAHDI. Removes Zaptel driver support with DAHDI. 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-12 17:27:55 +00:00
Russell Bryant 51051ce949 Add lock tracking for rwlocks. Previously, lock.h only had the ability to
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-06-03 18:26:51 +00:00
Sean Bright 9a535bd115 Avoid build warning when execinfo.h isn't available.
(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-29 12:12:07 +00:00
Russell Bryant 8fa6eaba67 Fix a linkage error related to the lock backtrace support
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@118695 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-28 15:56:41 +00:00
Mark Michelson 975a848b67 A new feature thanks to the fine folks at Switchvox!
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-23 22:35:50 +00:00
Mark Michelson 1b8f183ca3 This change makes it so that logs will report the correct source of verbose 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-21 22:34:27 +00:00
Steve Murphy 6d16c8915e These changes were made via the comments atis_work made at 4:30am (Mountain 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-21 01:00:28 +00:00
Tilghman Lesher edc0591ad5 Add a set of text to the file astcanary uses to communicate back the main
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-18 21:15:58 +00:00
Mark Michelson 55310cc855 Get refcounter to build with LOW_MEMORY defined
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@115473 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-06 20:15:02 +00:00
Steve Murphy 6138b16995 Introducing various astobj2 enhancements, chief being a refcount tracing 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-16 17:45:28 +00:00
Mark Michelson 115d5024a1 Merged revisions 114051 via svnmerge from
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-04-10 22:02:32 +00:00
Terry Wilson b02bc230af Go through and fix a bunch of places where character strings were being 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-18 15:43:34 +00:00
Steve Murphy 4e29ae8806 Merged revisions 109309 via svnmerge from
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
2008-03-18 14:09:50 +00:00
Kevin P. Fleming 79c3038ee5 Merged revisions 107352 via svnmerge from
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-11 11:36:51 +00:00
Steve Murphy 377e51c4d4 (closes issue #6002)
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
2008-03-07 18:57:57 +00:00
Tilghman Lesher 8718878490 Merged revisions 106552 via svnmerge from
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: https://origsvn.digium.com/svn/asterisk/trunk@106553 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-07 06:54:47 +00:00
Russell Bryant 7da06e6cb8 Merged revisions 105116 via svnmerge from
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: https://origsvn.digium.com/svn/asterisk/trunk@105144 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-28 22:39:26 +00:00
Tilghman Lesher f696089089 open(2) needs a mode argument when O_CREAT is specified.
(Closes issue #12083)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104534 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-27 15:34:28 +00:00
Tilghman Lesher a8e821d061 Ignore some more unused generated events.
(closes issue #12042)
 Reported by: junky
 Patches: 
       astman_events.diff uploaded by junky (license 177)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104014 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-21 05:21:39 +00:00
Tilghman Lesher 32a758d944 Remove extraneous copy
(closes issue #12002)
 Reported by: junky
 Patches: 
       conf2ael.diff uploaded by junky (license 177)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103716 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-15 15:45:33 +00:00
Tilghman Lesher 1dc86caf30 Merged revisions 102323 via svnmerge from
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: https://origsvn.digium.com/svn/asterisk/trunk@102329 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-04 21:15:18 +00:00
Steve Murphy 71ad27409c The fixes in this commit are mainly to allow compiling of trunk with --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: https://origsvn.digium.com/svn/asterisk/trunk@97656 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-10 00:50:39 +00:00
Joshua Colp 9c0c82d0d0 Make ast_atomic_fetchadd_int_slow magically appear in extconf.
(closes issue #11703)
Reported by: dmartin


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97041 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-08 15:26:50 +00:00
Luigi Rizzo 5e24835995 modify http://svn.digium.com/view/asterisk?view=rev&rev=93603
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: https://origsvn.digium.com/svn/asterisk/trunk@94168 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-20 09:55:05 +00:00
Tilghman Lesher 53436f42f4 Add a canary process, for high priority mode (asterisk -p) to ensure that if
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-18 23:06:05 +00:00
Luigi Rizzo 10f70a8321 make configuration variable const so they are not accidentally
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: https://origsvn.digium.com/svn/asterisk/trunk@93603 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-18 10:24:58 +00:00
Luigi Rizzo fd88390af7 remove unnecessary (char *) casts for ast_config_AST_* variables.
There are some left in the .flex files, left to the maintainer...



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-18 09:46:18 +00:00
Joshua Colp d7125b74c9 Add ast_atomic_fetchadd_int_slow to check_expr for platforms that need it.
(closes issue #11484)
Reported by: snuffy


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92206 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-10 16:48:18 +00:00
Luigi Rizzo 9e4ebbee87 remove relative paths and use ASTTOPDIR instead.
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-10 08:40:59 +00:00
Luigi Rizzo ff8134d30f simplify this file
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92103 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-10 08:35:35 +00:00
Luigi Rizzo 15d5e144b1 add hashtab.c to the list of files deleted
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-09 22:55:58 +00:00
Luigi Rizzo d652be0930 normalize subdirs' Makefile by using ASTTOPDIR and not .. to reference
the top level directory.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92022 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-09 21:29:37 +00:00
Luigi Rizzo 3fbcdac589 normalize header order, and add a comment on the need
to clean up this file.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@91930 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-08 03:27:16 +00:00
Russell Bryant 248dac6e73 Fix the build of astman. Any file that includes any asterisk sub-headers
needs to first include asterisk.h.
(closes issue #11394)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@91029 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-04 23:01:15 +00:00
Kevin P. Fleming 93615ecc22 let's try this again... *all* compilation and linking in Asterisk should be 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-29 13:38:11 +00:00
Steve Murphy 4c992507f4 closes issue #11341; made changes to make utils again right with the MTX_PROFILE world.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89595 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-26 17:46:41 +00:00
Luigi Rizzo 6dfc36b639 enable support for stack backtrace for stuff built in utils/
(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-21 21:30:24 +00:00
Kevin P. Fleming 3826d15993 move these forward declarations back to asterisk.h where they belong... even though asterisk.h includes compat.h, these declarations have nothing to do with the being platform-compatible and are directly related to being part of Asterisk
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89482 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-21 16:07:11 +00:00
Luigi Rizzo 04e1e0069f more header removal/normalization
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89473 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-21 00:23:49 +00:00
Luigi Rizzo b693c30a66 move the declaration of struct ast_channel ast_frame and ast_module
to compat.h so it is always available - hopefully this will let
us reduce the number of inclusions of channel.h and frame.h



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89426 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-19 19:36:32 +00:00
Luigi Rizzo 7cd78079ae more cygwin/mingw32 compatibility fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89373 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-17 10:54:52 +00:00
Luigi Rizzo 91475fd3dc add a return NULL to a function that is expected to return a value
so compilers that don't understand that this code is NOTREACHED
will not complain (the fault is not much on the compiler but on the
declaration of pthread_exit on certain platforms)
s/certain platform/cygwin/ if you are really curious



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89368 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-17 09:54:54 +00:00
Luigi Rizzo d82a631f9c more removal of duplicate #include lines
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89349 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-17 00:02:33 +00:00
Luigi Rizzo 4afe3b5ba9 remove redundant #include "asterisk/compat.h",
but make sure that asterisk/compiler.h is included everywhere



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89336 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16 21:08:28 +00:00
Luigi Rizzo fdb7f7ba3d Start untangling header inclusion in a way that does not affect
build times - tested, there is no measureable difference before and
after this commit.

In this change:

use asterisk/compat.h to include a small set of system headers:
inttypes.h, unistd.h, stddef.h, stddint.h, sys/types.h, stdarg.h,
stdlib.h, alloca.h, stdio.h

Where available, the inclusion is conditional on HAVE_FOO_H as determined
by autoconf.

Normally, source files should not include any of the above system headers,
and instead use either "asterisk.h" or "asterisk/compat.h" which does it
better. 

For the time being I have left alone second-level directories
(main/db1-ast, etc.).



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89333 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16 20:04:58 +00:00
Steve Murphy f033e50a15 Don't forget the ASTERISK_VERSION for the sake of the mtx_prof stuff.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89201 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-12 23:33:55 +00:00
Kevin P. Fleming c7773aa206 (closes issue #11221)
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-12 20:16:13 +00:00
Joshua Colp 098728eb64 Fix building on FreeBSD by including/not including some headers.
(closes issue #11218)
Reported by: ys
Patches:
      trunk89169.diff uploaded by ys (license 281)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89177 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-12 13:26:45 +00:00
Steve Murphy a897556f7f This is the perhaps the biggest, boldest, most daring change I've ever 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-09 16:00:22 +00:00
Kevin P. Fleming edc78d6023 improve linked-list macros in two ways:
- the *_CURRENT macros no longer need the list head pointer argument
  - add AST_LIST_MOVE_CURRENT to encapsulate the remove/add operation when moving entries between lists


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89106 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08 05:28:47 +00:00
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