2005-06-20 17:26:08 +00:00
|
|
|
#
|
|
|
|
# Asterisk -- A telephony toolkit for Linux.
|
|
|
|
#
|
|
|
|
# Various utilities
|
|
|
|
#
|
2006-04-24 17:11:45 +00:00
|
|
|
# Copyright (C) 1999-2006, Digium
|
2005-06-20 17:26:08 +00:00
|
|
|
#
|
|
|
|
# Mark Spencer <markster@digium.com>
|
|
|
|
#
|
|
|
|
# This program is free software, distributed under the terms of
|
|
|
|
# the GNU General Public License
|
|
|
|
#
|
|
|
|
|
2007-12-10 08:40:59 +00:00
|
|
|
ASTTOPDIR?=..
|
2007-12-09 21:29:37 +00:00
|
|
|
-include $(ASTTOPDIR)/menuselect.makeopts
|
2007-03-22 14:48:09 +00:00
|
|
|
|
2006-12-16 21:24:52 +00:00
|
|
|
.PHONY: clean all uninstall
|
2006-06-22 11:27:03 +00:00
|
|
|
|
2007-01-24 18:39:49 +00:00
|
|
|
# to get check_expr, add it to the ALL_UTILS list
|
2008-04-16 17:45:28 +00:00
|
|
|
ALL_UTILS:=astman smsq stereorize streamplayer aelparse muted check_expr conf2ael hashtest2 hashtest astcanary refcounter
|
2006-09-29 22:48:43 +00:00
|
|
|
UTILS:=$(ALL_UTILS)
|
|
|
|
|
2007-11-21 21:30:24 +00:00
|
|
|
LIBS += $(BKTR_LIB) # astobj2 with devmode uses backtrace
|
|
|
|
|
2006-09-29 22:48:43 +00:00
|
|
|
include $(ASTTOPDIR)/Makefile.rules
|
2004-06-04 15:44:14 +00:00
|
|
|
|
2006-09-19 14:16:12 +00:00
|
|
|
ifeq ($(OSARCH),SunOS)
|
2006-09-15 17:16:00 +00:00
|
|
|
LIBS+=-lsocket -lnsl
|
2006-09-18 22:35:40 +00:00
|
|
|
UTILS:=$(filter-out muted,$(UTILS))
|
2005-08-30 02:54:02 +00:00
|
|
|
endif
|
|
|
|
|
2006-10-28 16:39:40 +00:00
|
|
|
ifeq ($(OSARCH),OpenBSD)
|
|
|
|
UTILS:=$(filter-out muted,$(UTILS))
|
|
|
|
endif
|
|
|
|
|
2007-11-17 10:54:52 +00:00
|
|
|
ifeq ($(OSARCH),cygwin)
|
|
|
|
UTILS:=$(filter-out muted,$(UTILS))
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(OSARCH),mingw32)
|
|
|
|
UTILS:=
|
|
|
|
endif
|
|
|
|
|
2007-11-05 21:36:11 +00:00
|
|
|
ifneq ($(findstring darwin,$(OSARCH)),)
|
|
|
|
AUDIO_LIBS=-framework CoreAudio
|
|
|
|
endif
|
|
|
|
|
2006-04-24 17:11:45 +00:00
|
|
|
ifeq ($(POPT_LIB),)
|
|
|
|
UTILS:=$(filter-out smsq,$(UTILS))
|
2005-08-30 02:54:02 +00:00
|
|
|
endif
|
|
|
|
|
2006-04-24 17:11:45 +00:00
|
|
|
ifeq ($(NEWT_LIB),)
|
|
|
|
UTILS:=$(filter-out astman,$(UTILS))
|
2005-03-17 23:12:15 +00:00
|
|
|
endif
|
2004-12-11 22:36:27 +00:00
|
|
|
|
2006-06-05 20:46:27 +00:00
|
|
|
ifneq ($(filter pbx_ael,$(MENUSELECT_PBX)),)
|
2006-05-08 16:47:49 +00:00
|
|
|
UTILS:=$(filter-out aelparse,$(UTILS))
|
2007-08-15 19:21:27 +00:00
|
|
|
UTILS:=$(filter-out conf2ael,$(UTILS))
|
2006-05-08 16:47:49 +00:00
|
|
|
endif
|
|
|
|
|
2006-06-22 14:09:18 +00:00
|
|
|
all: $(UTILS)
|
2002-07-27 14:29:35 +00:00
|
|
|
|
|
|
|
install:
|
2006-04-24 17:11:45 +00:00
|
|
|
for x in $(UTILS); do \
|
2004-12-15 20:29:31 +00:00
|
|
|
if [ "$$x" != "none" ]; then \
|
2005-05-09 14:20:11 +00:00
|
|
|
$(INSTALL) -m 755 $$x $(DESTDIR)$(ASTSBINDIR)/$$x; \
|
2004-12-15 20:29:31 +00:00
|
|
|
fi; \
|
|
|
|
done
|
2002-07-27 14:29:35 +00:00
|
|
|
|
2006-02-01 18:39:41 +00:00
|
|
|
uninstall:
|
2006-09-29 22:48:43 +00:00
|
|
|
for x in $(ALL_UTILS); do rm -f $$x $(DESTDIR)$(ASTSBINDIR)/$$x; done
|
2006-02-01 18:39:41 +00:00
|
|
|
|
2006-12-16 21:24:52 +00:00
|
|
|
clean:
|
2006-09-29 22:48:43 +00:00
|
|
|
rm -f *.o $(ALL_UTILS) check_expr
|
2006-12-16 21:24:52 +00:00
|
|
|
rm -f .*.o.d .*.oo.d
|
2007-10-29 22:24:44 +00:00
|
|
|
rm -f *.s *.i
|
2007-12-09 22:55:58 +00:00
|
|
|
rm -f md5.c strcompat.c ast_expr2.c ast_expr2f.c pbx_ael.c pval.c hashtab.c
|
2007-08-15 19:21:27 +00:00
|
|
|
rm -f aelparse.c aelbison.c conf2ael
|
2008-04-16 17:45:28 +00:00
|
|
|
rm -f utils.c threadstorage.c sha1.c astobj2.c hashtest2 hashtest refcounter
|
2006-09-29 22:48:43 +00:00
|
|
|
|
2007-12-10 08:40:59 +00:00
|
|
|
md5.c: $(ASTTOPDIR)/main/md5.c
|
2006-09-29 22:48:43 +00:00
|
|
|
@cp $< $@
|
|
|
|
astman: astman.o md5.o
|
2006-10-05 01:43:02 +00:00
|
|
|
astman: LIBS+=$(NEWT_LIB)
|
2003-05-06 00:00:20 +00:00
|
|
|
|
2006-09-29 22:48:43 +00:00
|
|
|
stereorize: stereorize.o frame.o
|
2006-07-15 16:40:05 +00:00
|
|
|
stereorize: LIBS+=-lm
|
2005-01-21 03:56:22 +00:00
|
|
|
|
2007-12-10 08:40:59 +00:00
|
|
|
hashtab.c: $(ASTTOPDIR)/main/hashtab.c
|
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: http://svn.digium.com/svn/asterisk/trunk@89129 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-09 16:00:22 +00:00
|
|
|
@cp $< $@
|
|
|
|
|
2007-12-10 08:40:59 +00:00
|
|
|
strcompat.c: $(ASTTOPDIR)/main/strcompat.c
|
2006-09-29 22:48:43 +00:00
|
|
|
@cp $< $@
|
2006-09-15 17:16:00 +00:00
|
|
|
|
2007-12-10 08:40:59 +00:00
|
|
|
$(ASTTOPDIR)/main/ast_expr2.c:
|
|
|
|
@echo " [BISON] $(ASTTOPDIR)/main/ast_expr2.y -> $@"
|
|
|
|
@bison -o $@ -d --name-prefix=ast_yy $(ASTTOPDIR)/main/ast_expr2.y
|
2006-05-08 14:34:32 +00:00
|
|
|
|
2007-12-10 08:40:59 +00:00
|
|
|
$(ASTTOPDIR)/main/ast_expr2f.c:
|
|
|
|
@echo " [FLEX] $(ASTTOPDIR)/main/ast_expr2.fl -> $@"
|
|
|
|
@flex -o $@ --full $(ASTTOPDIR)/main/ast_expr2.fl
|
2006-04-29 14:48:32 +00:00
|
|
|
|
2007-12-10 08:40:59 +00:00
|
|
|
pval.c: $(ASTTOPDIR)/res/ael/pval.c
|
2007-08-15 19:21:27 +00:00
|
|
|
@cp $< $@
|
|
|
|
|
2007-12-10 08:40:59 +00:00
|
|
|
ast_expr2.c: $(ASTTOPDIR)/main/ast_expr2.c
|
2006-09-29 22:48:43 +00:00
|
|
|
@cp $< $@
|
2005-08-29 22:03:37 +00:00
|
|
|
|
2007-12-10 08:40:59 +00:00
|
|
|
ast_expr2f.c: $(ASTTOPDIR)/main/ast_expr2f.c
|
2006-09-29 22:48:43 +00:00
|
|
|
@cp $< $@
|
2005-08-29 22:03:37 +00:00
|
|
|
|
2008-03-11 11:36:51 +00:00
|
|
|
ast_expr2f.o: ASTCFLAGS+=-DSTANDALONE_AEL -I$(ASTTOPDIR)/main -Wno-unused
|
2005-06-21 20:16:51 +00:00
|
|
|
|
2007-08-15 19:21:27 +00:00
|
|
|
pval.o : ASTCFLAGS+=-DSTANDALONE
|
|
|
|
|
2007-11-12 20:16:13 +00:00
|
|
|
check_expr: check_expr.o ast_expr2.o ast_expr2f.o strcompat.o threadstorage.o clicompat.o
|
2006-05-19 19:46:10 +00:00
|
|
|
|
2007-12-10 08:40:59 +00:00
|
|
|
aelbison.c: $(ASTTOPDIR)/res/ael/ael.tab.c
|
2006-09-29 22:48:43 +00:00
|
|
|
@cp $< $@
|
2007-10-29 22:44:49 +00:00
|
|
|
|
2007-12-10 08:40:59 +00:00
|
|
|
aelbison.o: ASTCFLAGS+=-I$(ASTTOPDIR)/res/ael -DYYENABLE_NLS=0
|
2006-05-19 19:46:10 +00:00
|
|
|
|
2007-12-10 08:40:59 +00:00
|
|
|
pbx_ael.c: $(ASTTOPDIR)/pbx/pbx_ael.c
|
2006-09-29 22:48:43 +00:00
|
|
|
@cp $< $@
|
2006-05-19 19:46:10 +00:00
|
|
|
|
2007-10-29 22:44:49 +00:00
|
|
|
pbx_ael.o: ASTCFLAGS+=-DSTANDALONE_AEL
|
2006-09-29 22:48:43 +00:00
|
|
|
|
2007-12-10 08:40:59 +00:00
|
|
|
aelparse.c: $(ASTTOPDIR)/res/ael/ael_lex.c
|
2006-09-29 22:48:43 +00:00
|
|
|
@cp $< $@
|
2007-10-29 22:44:49 +00:00
|
|
|
|
2008-03-11 11:36:51 +00:00
|
|
|
aelparse.o: ASTCFLAGS+=-I$(ASTTOPDIR)/res -DSTANDALONE_AEL -Wno-unused
|
2007-08-15 19:21:27 +00:00
|
|
|
|
(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: http://svn.digium.com/svn/asterisk/trunk@106757 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-07 18:57:57 +00:00
|
|
|
aelparse: aelparse.o aelbison.o pbx_ael.o hashtab.o ael_main.o ast_expr2f.o ast_expr2.o strcompat.o pval.o extconf.o
|
2007-08-15 19:21:27 +00:00
|
|
|
|
2007-12-10 08:40:59 +00:00
|
|
|
astobj2.c: $(ASTTOPDIR)/main/astobj2.c
|
2007-10-29 22:44:49 +00:00
|
|
|
@cp $< $@
|
2007-09-10 16:59:18 +00:00
|
|
|
|
2007-12-10 08:40:59 +00:00
|
|
|
utils.c: $(ASTTOPDIR)/main/utils.c
|
2007-10-29 22:44:49 +00:00
|
|
|
@cp $< $@
|
2007-09-10 16:59:18 +00:00
|
|
|
|
2007-12-10 08:40:59 +00:00
|
|
|
sha1.c: $(ASTTOPDIR)/main/sha1.c
|
2007-10-29 22:44:49 +00:00
|
|
|
@cp $< $@
|
2007-09-10 16:59:18 +00:00
|
|
|
|
2007-12-10 08:40:59 +00:00
|
|
|
threadstorage.c: $(ASTTOPDIR)/main/threadstorage.c
|
2007-10-29 22:44:49 +00:00
|
|
|
@cp $< $@
|
2007-09-10 16:59:18 +00:00
|
|
|
|
2007-10-29 22:44:49 +00:00
|
|
|
hashtest2.o: ASTCFLAGS+=-O0
|
2007-09-10 16:59:18 +00:00
|
|
|
|
2007-10-29 22:44:49 +00:00
|
|
|
hashtest2: hashtest2.o md5.o utils.o astobj2.o sha1.o strcompat.o threadstorage.o clicompat.o
|
2007-09-10 16:59:18 +00:00
|
|
|
|
2007-11-12 20:16:13 +00:00
|
|
|
hashtest: hashtest.o md5.o hashtab.o utils.o sha1.o strcompat.o threadstorage.o clicompat.o
|
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: http://svn.digium.com/svn/asterisk/trunk@89129 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-09 16:00:22 +00:00
|
|
|
|
2007-11-29 13:38:11 +00:00
|
|
|
hashtest.o: ASTCFLAGS+=-O0
|
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: http://svn.digium.com/svn/asterisk/trunk@89129 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-09 16:00:22 +00:00
|
|
|
|
2008-04-16 17:45:28 +00:00
|
|
|
refcounter: refcounter.o md5.o hashtab.o utils.o sha1.o strcompat.o threadstorage.o clicompat.o
|
|
|
|
|
|
|
|
refcounter.o: ASTCFLAGS+=-O0
|
|
|
|
|
2007-11-29 13:38:11 +00:00
|
|
|
extconf.o: extconf.c
|
2007-08-15 19:21:27 +00:00
|
|
|
|
(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: http://svn.digium.com/svn/asterisk/trunk@106757 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-07 18:57:57 +00:00
|
|
|
conf2ael: conf2ael.o ast_expr2f.o ast_expr2.o hashtab.o aelbison.o aelparse.o pbx_ael.o pval.o extconf.o strcompat.o
|
2006-04-24 17:41:27 +00:00
|
|
|
|
2007-12-10 08:40:59 +00:00
|
|
|
testexpr2s: $(ASTTOPDIR)/main/ast_expr2f.c $(ASTTOPDIR)/main/ast_expr2.c $(ASTTOPDIR)/main/ast_expr2.h
|
|
|
|
$(CC) -g -c -I$(ASTTOPDIR)/include -DSTANDALONE_AEL $(ASTTOPDIR)/main/ast_expr2f.c -o ast_expr2f.o
|
|
|
|
$(CC) -g -c -I$(ASTTOPDIR)/include -DSTANDALONE_AEL $(ASTTOPDIR)/main/ast_expr2.c -o ast_expr2.o
|
2006-05-24 18:18:14 +00:00
|
|
|
$(CC) -g -o testexpr2s ast_expr2f.o ast_expr2.o
|
2006-04-24 17:41:27 +00:00
|
|
|
rm ast_expr2.o ast_expr2f.o
|
|
|
|
./testexpr2s expr2.testinput
|
|
|
|
|
2006-09-15 17:16:00 +00:00
|
|
|
smsq: smsq.o strcompat.o
|
2006-08-21 02:11:39 +00:00
|
|
|
smsq: LIBS+=$(POPT_LIB)
|
2004-12-11 22:36:27 +00:00
|
|
|
|
2005-08-22 19:29:29 +00:00
|
|
|
streamplayer: streamplayer.o
|
|
|
|
|
2006-08-21 02:11:39 +00:00
|
|
|
muted: muted.o
|
|
|
|
muted: LIBS+=$(AUDIO_LIBS)
|
|
|
|
|
2006-12-16 21:24:52 +00:00
|
|
|
ifneq ($(wildcard .*.d),)
|
|
|
|
include .*.d
|
2006-09-09 03:27:21 +00:00
|
|
|
endif
|