[asterisk-commits] mogorman: branch mogorman/asterisk-jabber r41163 - in /team/mogorman/asterisk...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Aug 25 14:18:48 MST 2006


Author: mogorman
Date: Fri Aug 25 16:18:48 2006
New Revision: 41163

URL: http://svn.digium.com/view/asterisk?rev=41163&view=rev
Log:
update

Added:
    team/mogorman/asterisk-jabber/pbx/ael/ael-test/ael-test14/
      - copied from r41150, trunk/pbx/ael/ael-test/ael-test14/
    team/mogorman/asterisk-jabber/pbx/ael/ael-test/ael-test14/extensions.ael
      - copied unchanged from r41150, trunk/pbx/ael/ael-test/ael-test14/extensions.ael
    team/mogorman/asterisk-jabber/pbx/ael/ael-test/ref.ael-test14
      - copied unchanged from r41150, trunk/pbx/ael/ael-test/ref.ael-test14
Modified:
    team/mogorman/asterisk-jabber/Makefile
    team/mogorman/asterisk-jabber/UPGRADE.txt
    team/mogorman/asterisk-jabber/apps/app_speech_utils.c
    team/mogorman/asterisk-jabber/bootstrap.sh
    team/mogorman/asterisk-jabber/build_tools/make_buildopts_h
    team/mogorman/asterisk-jabber/build_tools/mkpkgconfig
    team/mogorman/asterisk-jabber/channels/chan_iax2.c
    team/mogorman/asterisk-jabber/channels/chan_zap.c
    team/mogorman/asterisk-jabber/codecs/gsm/Makefile
    team/mogorman/asterisk-jabber/configs/modules.conf.sample
    team/mogorman/asterisk-jabber/configs/zapata.conf.sample
    team/mogorman/asterisk-jabber/configure
    team/mogorman/asterisk-jabber/configure.ac
    team/mogorman/asterisk-jabber/doc/queues-with-callback-members.txt
    team/mogorman/asterisk-jabber/doc/speechrec.txt
    team/mogorman/asterisk-jabber/include/asterisk/autoconfig.h.in
    team/mogorman/asterisk-jabber/include/asterisk/linkedlists.h
    team/mogorman/asterisk-jabber/include/asterisk/paths.h
    team/mogorman/asterisk-jabber/main/asterisk.c
    team/mogorman/asterisk-jabber/main/channel.c
    team/mogorman/asterisk-jabber/main/file.c
    team/mogorman/asterisk-jabber/main/loader.c
    team/mogorman/asterisk-jabber/main/pbx.c
    team/mogorman/asterisk-jabber/main/utils.c
    team/mogorman/asterisk-jabber/makeopts.in
    team/mogorman/asterisk-jabber/pbx/pbx_ael.c
    team/mogorman/asterisk-jabber/res/res_musiconhold.c
    team/mogorman/asterisk-jabber/utils/   (props changed)
    team/mogorman/asterisk-jabber/utils/Makefile
    team/mogorman/asterisk-jabber/utils/ael_main.c

Modified: team/mogorman/asterisk-jabber/Makefile
URL: http://svn.digium.com/view/asterisk/team/mogorman/asterisk-jabber/Makefile?rev=41163&r1=41162&r2=41163&view=diff
==============================================================================
--- team/mogorman/asterisk-jabber/Makefile (original)
+++ team/mogorman/asterisk-jabber/Makefile Fri Aug 25 16:18:48 2006
@@ -163,7 +163,8 @@
 endif
 
 ifeq ($(OSARCH),FreeBSD)
-  BSDVERSION=$(shell $(MAKE) -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk)
+  # -V is understood by BSD Make, not by GNU make.
+  BSDVERSION=$(shell make -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk)
   ASTCFLAGS+=$(shell if test $(BSDVERSION) -lt 500016 ; then echo "-D_THREAD_SAFE"; fi)
   AST_LIBS+=$(shell if test  $(BSDVERSION) -lt 502102 ; then echo "-lc_r"; else echo "-pthread"; fi)
 endif
@@ -331,7 +332,7 @@
 	rm -f build_tools/menuselect-deps
 
 datafiles: all
-	if [ x`$(ID) -un` = xroot ]; then sh build_tools/mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; fi
+	if [ x`$(ID) -un` = xroot ]; then CFLAGS="$(ASTCFLAGS)" sh build_tools/mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; fi
 # Should static HTTP be installed during make samples or even with its own target ala
 # webvoicemail?  There are portions here that *could* be customized but might also be
 # improved a lot.  I'll put it here for now.
@@ -646,7 +647,7 @@
 	- at menuselect/menuselect $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS) menuselect.makeopts && echo "menuselect changes saved!" || echo "menuselect changes NOT saved!"
 
 menuselect/menuselect: makeopts menuselect/menuselect.c menuselect/menuselect_curses.c menuselect/menuselect_stub.c menuselect/menuselect.h menuselect/linkedlists.h makeopts
-	@CFLAGS="-include $(ASTTOPDIR)/include/asterisk/autoconfig.h -I$(ASTTOPDIR)/include" PARENTSRC="$(ASTTOPDIR)" $(MAKE) -C menuselect CC="$(HOST_CC)"
+	@PARENTSRC="$(ASTTOPDIR)" $(MAKE) -C menuselect CC="$(HOST_CC)"
 
 menuselect-tree: $(foreach dir,$(filter-out main,$(MOD_SUBDIRS)),$(wildcard $(dir)/*.c) $(wildcard $(dir)/*.cc)) build_tools/cflags.xml sounds/sounds.xml build_tools/embed_modules.xml
 	@echo "Generating input for menuselect ..."

Modified: team/mogorman/asterisk-jabber/UPGRADE.txt
URL: http://svn.digium.com/view/asterisk/team/mogorman/asterisk-jabber/UPGRADE.txt?rev=41163&r1=41162&r2=41163&view=diff
==============================================================================
--- team/mogorman/asterisk-jabber/UPGRADE.txt (original)
+++ team/mogorman/asterisk-jabber/UPGRADE.txt Fri Aug 25 16:18:48 2006
@@ -298,6 +298,10 @@
   option in sip.conf is removed to osp.conf as authpolicy. allowguest option
   in sip.conf cannot be set as osp anymore. 
 
+* The $SIPUSERAGENT dialplan variable is deprecated and will be removed
+  in coming versions of Asterisk. Please use the dialplan function
+  SIPCHANINFO(useragent) instead.
+
 The Zap channel:
 
 * Support for MFC/R2 has been removed, as it has not been functional for some

Modified: team/mogorman/asterisk-jabber/apps/app_speech_utils.c
URL: http://svn.digium.com/view/asterisk/team/mogorman/asterisk-jabber/apps/app_speech_utils.c?rev=41163&r1=41162&r2=41163&view=diff
==============================================================================
--- team/mogorman/asterisk-jabber/apps/app_speech_utils.c (original)
+++ team/mogorman/asterisk-jabber/apps/app_speech_utils.c Fri Aug 25 16:18:48 2006
@@ -64,8 +64,7 @@
 "Once they stop talking the processing sound is played to indicate the speech recognition engine is working.\n"
 "Once results are available the application returns and results (score and text) are available using dialplan functions.\n"
 "The first text and score are ${SPEECH_TEXT(0)} AND ${SPEECH_SCORE(0)} while the second are ${SPEECH_TEXT(1)} and ${SPEECH_SCORE(1)}.\n"
-"This may change in the future, however, to use a dialplan function instead of dialplan variables. Note it is possible to have more then one result.\n"
-	"The first argument is the sound file and the second is the timeout. Note the timeout will only start once the sound file has stopped playing.\n";
+"The first argument is the sound file and the second is the timeout. Note the timeout will only start once the sound file has stopped playing.\n";
 
 static char *speechdeactivategrammar_descrip =
 "SpeechDeactivateGrammar(Grammar Name)\n"

Modified: team/mogorman/asterisk-jabber/bootstrap.sh
URL: http://svn.digium.com/view/asterisk/team/mogorman/asterisk-jabber/bootstrap.sh?rev=41163&r1=41162&r2=41163&view=diff
==============================================================================
--- team/mogorman/asterisk-jabber/bootstrap.sh (original)
+++ team/mogorman/asterisk-jabber/bootstrap.sh Fri Aug 25 16:18:48 2006
@@ -12,17 +12,17 @@
 uname -s | grep -q FreeBSD
 if [ $? = 0 ]
 then
-	check_for_app autoconf259
-	check_for_app autoheader259
+	check_for_app autoconf260
+	check_for_app autoheader260
 	check_for_app automake19
 	check_for_app aclocal19
 	echo "Generating the configure script ..."
 	aclocal19 2>/dev/null
-	autoconf259
-	autoheader259
+	autoconf260
+	autoheader260
 	automake19 --add-missing --copy 2>/dev/null
 else
-	AUTOCONF_VERSION=2.59
+	AUTOCONF_VERSION=2.60
 	AUTOMAKE_VERSION=1.9
 	export AUTOCONF_VERSION
 	export AUTOMAKE_VERSION

Modified: team/mogorman/asterisk-jabber/build_tools/make_buildopts_h
URL: http://svn.digium.com/view/asterisk/team/mogorman/asterisk-jabber/build_tools/make_buildopts_h?rev=41163&r1=41162&r2=41163&view=diff
==============================================================================
--- team/mogorman/asterisk-jabber/build_tools/make_buildopts_h (original)
+++ team/mogorman/asterisk-jabber/build_tools/make_buildopts_h Fri Aug 25 16:18:48 2006
@@ -7,7 +7,7 @@
  */
 
 END
-TMP=`grep MENUSELECT_CFLAGS menuselect.makeopts | sed s/MENUSELECT_CFLAGS\=//g | sed s/-D//g`
+TMP=`grep MENUSELECT_CFLAGS menuselect.makeopts | sed 's/MENUSELECT_CFLAGS\=//g' | sed 's/-D//g'`
 for x in ${TMP}; do
      echo "#define ${x} 1"
 done

Modified: team/mogorman/asterisk-jabber/build_tools/mkpkgconfig
URL: http://svn.digium.com/view/asterisk/team/mogorman/asterisk-jabber/build_tools/mkpkgconfig?rev=41163&r1=41162&r2=41163&view=diff
==============================================================================
--- team/mogorman/asterisk-jabber/build_tools/mkpkgconfig (original)
+++ team/mogorman/asterisk-jabber/build_tools/mkpkgconfig Fri Aug 25 16:18:48 2006
@@ -13,13 +13,20 @@
   exit
 fi
 
+#Solaris (and some others) don't have sed -r.  perl -p is equivalent
+if [[ `echo "xxx" | sed -r 's/x/y/g' 2>/dev/null | grep -c "yyy"` != 0 ]]; then
+    EXTREGEX="sed -r -e"
+else
+    EXTREGEX="perl -pe"
+fi
+
 ## Clean out CFLAGS for the spec file.
 
-LOCAL_CFLAGS=`echo $CFLAGS | sed -e 's/\s*-pipe\s*//g' | sed -e 's/-[Wmp]\S*\s*//g' | \
-  sed -r -e 's/-I(include|\.\.\/include) //g' | \
-  sed -e 's/-DINSTALL_PREFIX=\S* //g' | \
-  sed -r -e 's/-DASTERISK_VERSION=\S* //g' | \
-  sed -r -e 's/-DAST(ETCDIR|LIBDIR|VARLIBDIR|VARRUNDIR|SPOOLDIR|LOGDIR|CONFPATH|MODDIR|AGIDIR)=\S* //g'`
+LOCAL_CFLAGS=`echo $CFLAGS | ${EXTREGEX} 's/\s*-pipe\s*//g' | ${EXTREGEX} 's/-[Wmp]\S*\s*//g' | \
+  ${EXTREGEX} 's/-I(include|\.\.\/include) //g' | \
+  ${EXTREGEX} 's/-DINSTALL_PREFIX=\S* //g' | \
+  ${EXTREGEX} 's/-DASTERISK_VERSION=\S* //g' | \
+  ${EXTREGEX} 's/-DAST(ETCDIR|LIBDIR|VARLIBDIR|VARRUNDIR|SPOOLDIR|LOGDIR|CONFPATH|MODDIR|AGIDIR)=\S* //g'`
 
 
 cat <<EOF > $PPATH/asterisk.pc

Modified: team/mogorman/asterisk-jabber/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/mogorman/asterisk-jabber/channels/chan_iax2.c?rev=41163&r1=41162&r2=41163&view=diff
==============================================================================
--- team/mogorman/asterisk-jabber/channels/chan_iax2.c (original)
+++ team/mogorman/asterisk-jabber/channels/chan_iax2.c Fri Aug 25 16:18:48 2006
@@ -4743,19 +4743,21 @@
 		/* Keep this check last */
 		if (!ast_strlen_zero(user->dbsecret)) {
 			char *family, *key=NULL;
+			char buf[80];
 			family = ast_strdupa(user->dbsecret);
 			key = strchr(family, '/');
 			if (key) {
 				*key = '\0';
 				key++;
 			}
-			if (!key || ast_db_get(family, key, (char*)iaxs[callno]->secret, sizeof(iaxs[callno]->secret))) {
+			if (!key || ast_db_get(family, key, buf, sizeof(buf))) {
 				ast_log(LOG_WARNING, "Unable to retrieve database password for family/key '%s'!\n", user->dbsecret);
 				if (ast_test_flag(user, IAX_TEMPONLY)) {
 					destroy_user(user);
 					user = NULL;
 				}
-			}
+			} else
+				ast_string_field_set(iaxs[callno], secret, buf);
 		} else
 			ast_string_field_set(iaxs[callno], secret, user->secret);
 		res = 0;

Modified: team/mogorman/asterisk-jabber/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/team/mogorman/asterisk-jabber/channels/chan_zap.c?rev=41163&r1=41162&r2=41163&view=diff
==============================================================================
--- team/mogorman/asterisk-jabber/channels/chan_zap.c (original)
+++ team/mogorman/asterisk-jabber/channels/chan_zap.c Fri Aug 25 16:18:48 2006
@@ -8628,10 +8628,11 @@
 						res = set_actual_gain(pri->pvts[chanpos]->subs[SUB_REAL].zfd, 0, pri->pvts[chanpos]->rxgain, pri->pvts[chanpos]->txgain, law);
 						if (res < 0)
 							ast_log(LOG_WARNING, "Unable to set gains on channel %d\n", pri->pvts[chanpos]->channel);
-						if (e->ring.complete || !pri->overlapdial)
+						if (e->ring.complete || !pri->overlapdial) {
 							/* Just announce proceeding */
+							pri->pvts[chanpos]->proceeding = 1;
 							pri_proceeding(pri->pri, e->ring.call, PVT_TO_CHANNEL(pri->pvts[chanpos]), 0);
-						else  {
+						} else {
 							if (pri->switchtype != PRI_SWITCH_GR303_TMC) 
 								pri_need_more_info(pri->pri, e->ring.call, PVT_TO_CHANNEL(pri->pvts[chanpos]), 1);
 							else

Modified: team/mogorman/asterisk-jabber/codecs/gsm/Makefile
URL: http://svn.digium.com/view/asterisk/team/mogorman/asterisk-jabber/codecs/gsm/Makefile?rev=41163&r1=41162&r2=41163&view=diff
==============================================================================
--- team/mogorman/asterisk-jabber/codecs/gsm/Makefile (original)
+++ team/mogorman/asterisk-jabber/codecs/gsm/Makefile Fri Aug 25 16:18:48 2006
@@ -38,7 +38,7 @@
 ######### probably require gcc. 
 
 ifeq (, $(findstring $(OSARCH) , Darwin SunOS ))
-ifeq (, $(findstring $(PROC) , x86_64 amd64 ultrasparc sparc64 arm ppc ppc64 ia64 s390 bfin ))
+ifeq (, $(findstring $(PROC) , x86_64 amd64 ultrasparc sparc64 arm ppc powerpc ppc64 ia64 s390 bfin ))
 ifeq (, $(findstring $(shell uname -m) , ppc ppc64 alpha armv4l s390 ))
 OPTIMIZE+=-march=$(PROC)
 endif

Modified: team/mogorman/asterisk-jabber/configs/modules.conf.sample
URL: http://svn.digium.com/view/asterisk/team/mogorman/asterisk-jabber/configs/modules.conf.sample?rev=41163&r1=41162&r2=41163&view=diff
==============================================================================
--- team/mogorman/asterisk-jabber/configs/modules.conf.sample (original)
+++ team/mogorman/asterisk-jabber/configs/modules.conf.sample Fri Aug 25 16:18:48 2006
@@ -36,8 +36,3 @@
 ;
 noload => chan_alsa.so
 ;noload => chan_oss.so
-;
-; Module names listed in "global" section will have symbols globally
-; exported to modules loaded after them.
-;
-[global]

Modified: team/mogorman/asterisk-jabber/configs/zapata.conf.sample
URL: http://svn.digium.com/view/asterisk/team/mogorman/asterisk-jabber/configs/zapata.conf.sample?rev=41163&r1=41162&r2=41163&view=diff
==============================================================================
--- team/mogorman/asterisk-jabber/configs/zapata.conf.sample (original)
+++ team/mogorman/asterisk-jabber/configs/zapata.conf.sample Fri Aug 25 16:18:48 2006
@@ -73,6 +73,7 @@
 ; local:          Local ISDN
 ; national:	  National ISDN
 ; international:  International ISDN
+; dynamic:	  Dynamically selects the appropriate dialplan
 ;
 ;pridialplan=national
 ;
@@ -83,6 +84,7 @@
 ; local:          Local ISDN
 ; national:	  National ISDN
 ; international:  International ISDN
+; dynamic:	  Dynamically selects the appropriate dialplan
 ;
 ;prilocaldialplan=national
 ;

Modified: team/mogorman/asterisk-jabber/configure
URL: http://svn.digium.com/view/asterisk/team/mogorman/asterisk-jabber/configure?rev=41163&r1=41162&r2=41163&view=diff
==============================================================================
--- team/mogorman/asterisk-jabber/configure (original)
+++ team/mogorman/asterisk-jabber/configure Fri Aug 25 16:18:48 2006
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.ac Revision: 40790 .
+# From configure.ac Revision: 41119 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.60.
 #
@@ -810,7 +810,8 @@
 GTK_LIB
 CURL
 PBX_CURL
-CURLLIB
+CURL_INCLUDE
+CURL_LIB
 LTLIBOBJS'
 ac_subst_files=''
       ac_precious_vars='build_alias
@@ -4853,6 +4854,35 @@
 
 
 
+# http://www.mail-archive.com/bug-make@gnu.org/msg02871.html
+echo 'define A' > testMakefile
+echo '12345: $(1:.idl=.hh) $(1:.idl=S.h) $(1:.idl=C.h) $(1:.idl=SK.cc) $(1:.idl=DynSK.cc)' >> testMakefile
+echo 'endef' >> testMakefile
+echo '$(eval $(call A,01234567890123456789012345678901.idl))' >> testMakefile
+echo '01234567890123456789012345678901.hh:' >> testMakefile
+echo '01234567890123456789012345678901S.h:' >> testMakefile
+echo '01234567890123456789012345678901C.h:' >> testMakefile
+echo '01234567890123456789012345678901SK.cc:' >> testMakefile
+echo '01234567890123456789012345678901DynSK.cc:' >> testMakefile
+$GNU_MAKE -r -f testMakefile 2>&1 > /dev/null
+if test "$?" != "0" ; then
+  rm -f testMakefile
+  { echo "$as_me:$LINENO: ********** ERROR **********" >&5
+echo "$as_me: ********** ERROR **********" >&6;}
+  { echo "$as_me:$LINENO: Your version of GNU Make contains a bug that will cause the Asterisk build" >&5
+echo "$as_me: Your version of GNU Make contains a bug that will cause the Asterisk build" >&6;}
+  { echo "$as_me:$LINENO: system to not function properly.  This bug is known to be fixed in version" >&5
+echo "$as_me: system to not function properly.  This bug is known to be fixed in version" >&6;}
+  { echo "$as_me:$LINENO: 3.81 as well as distributions of 3.80 that contain backported bug fixes.  You" >&5
+echo "$as_me: 3.81 as well as distributions of 3.80 that contain backported bug fixes.  You" >&6;}
+  { echo "$as_me:$LINENO: must update GNU make to build Asterisk." >&5
+echo "$as_me: must update GNU make to build Asterisk." >&6;}
+  { echo "$as_me:$LINENO: ***************************" >&5
+echo "$as_me: ***************************" >&6;}
+  exit 1
+fi
+rm -f testMakefile
+
 # Extract the first word of "grep", so it can be a program name with args.
 set dummy grep; ac_word=$2
 { echo "$as_me:$LINENO: checking for $ac_word" >&5
@@ -13640,6 +13670,76 @@
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_RES_NINIT 1
+_ACEOF
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+
+{ echo "$as_me:$LINENO: checking checking for RTLD_NOLOAD" >&5
+echo $ECHO_N "checking checking for RTLD_NOLOAD... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <dlfcn.h>
+int
+main ()
+{
+int foo = RTLD_NOLOAD;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_RTLD_NOLOAD 1
 _ACEOF
 
 else
@@ -29371,7 +29471,8 @@
 # check for version
    if test "${host_os}" = "SunOS"; then
       if [ 0x`curl-config --vernum` -ge 0x70907 ]; then
-         CURLLIB=$(${CURL} --libs)
+         CURL_INCLUDE=$(${CURL} --cflags)
+         CURL_LIB=$(${CURL} --libs)
          PBX_CURL=1
 
 cat >>confdefs.h <<\_ACEOF
@@ -29381,7 +29482,8 @@
       fi
    else
       if [[ 0x`curl-config --vernum` -ge 0x70907 ]]; then
-         CURLLIB=$(${CURL} --libs)
+         CURL_INCLUDE=$(${CURL} --cflags)
+         CURL_LIB=$(${CURL} --libs)
          PBX_CURL=1
 
 cat >>confdefs.h <<\_ACEOF
@@ -29391,6 +29493,7 @@
       fi
    fi
 fi
+
 
 
 
@@ -30290,11 +30393,12 @@
 GTK_LIB!$GTK_LIB$ac_delim
 CURL!$CURL$ac_delim
 PBX_CURL!$PBX_CURL$ac_delim
-CURLLIB!$CURLLIB$ac_delim
+CURL_INCLUDE!$CURL_INCLUDE$ac_delim
+CURL_LIB!$CURL_LIB$ac_delim
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 16; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 17; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
@@ -30760,20 +30864,3 @@
    { echo "$as_me:$LINENO: Cross Compilation = YES" >&5
 echo "$as_me: Cross Compilation = YES" >&6;}
 fi
-
-if test ${GNU_MAKE_VERSION_MAJOR} -lt 3 || test ${GNU_MAKE_VERSION_MINOR} -lt 81 ; then
-   { echo "$as_me:$LINENO: " >&5
-echo "$as_me: " >&6;}
-   { echo "$as_me:$LINENO: ***** WARNING ******" >&5
-echo "$as_me: ***** WARNING ******" >&6;}
-   { echo "$as_me:$LINENO: You are currently using GNU Make version ${GNU_MAKE_VERSION_MAJOR}.${GNU_MAKE_VERSION_MINOR}." >&5
-echo "$as_me: You are currently using GNU Make version ${GNU_MAKE_VERSION_MAJOR}.${GNU_MAKE_VERSION_MINOR}." >&6;}
-   { echo "$as_me:$LINENO: The Asterisk build system uses features that may not work correctly prior to 3.81." >&5
-echo "$as_me: The Asterisk build system uses features that may not work correctly prior to 3.81." >&6;}
-   { echo "$as_me:$LINENO: Please consider upgrading GNU Make or you may experience problems." >&5
-echo "$as_me: Please consider upgrading GNU Make or you may experience problems." >&6;}
-   { echo "$as_me:$LINENO: ********************" >&5
-echo "$as_me: ********************" >&6;}
-   { echo "$as_me:$LINENO: " >&5
-echo "$as_me: " >&6;}
-fi

Modified: team/mogorman/asterisk-jabber/configure.ac
URL: http://svn.digium.com/view/asterisk/team/mogorman/asterisk-jabber/configure.ac?rev=41163&r1=41162&r2=41163&view=diff
==============================================================================
--- team/mogorman/asterisk-jabber/configure.ac (original)
+++ team/mogorman/asterisk-jabber/configure.ac Fri Aug 25 16:18:48 2006
@@ -1,6 +1,6 @@
 # Process this file with autoconf to produce a configure script.
 
-AC_PREREQ(2.59)
+AC_PREREQ(2.60)
 
 m4_define([PBX_VERSION],
           m4_bpatsubst(m4_esyscmd([build_tools/make_version .]),
@@ -107,6 +107,29 @@
 AC_PROG_LN_S
 AC_PROG_RANLIB
 AST_CHECK_GNU_MAKE
+
+# http://www.mail-archive.com/bug-make@gnu.org/msg02871.html
+echo 'define A' > testMakefile
+echo '12345: $(1:.idl=.hh) $(1:.idl=S.h) $(1:.idl=C.h) $(1:.idl=SK.cc) $(1:.idl=DynSK.cc)' >> testMakefile
+echo 'endef' >> testMakefile
+echo '$(eval $(call A,01234567890123456789012345678901.idl))' >> testMakefile
+echo '01234567890123456789012345678901.hh:' >> testMakefile
+echo '01234567890123456789012345678901S.h:' >> testMakefile
+echo '01234567890123456789012345678901C.h:' >> testMakefile
+echo '01234567890123456789012345678901SK.cc:' >> testMakefile
+echo '01234567890123456789012345678901DynSK.cc:' >> testMakefile
+$GNU_MAKE -r -f testMakefile 2>&1 > /dev/null
+if test "$?" != "0" ; then
+  rm -f testMakefile
+  AC_MSG_NOTICE(********** ERROR **********)
+  AC_MSG_NOTICE(Your version of GNU Make contains a bug that will cause the Asterisk build)
+  AC_MSG_NOTICE(system to not function properly.  This bug is known to be fixed in version)
+  AC_MSG_NOTICE(3.81 as well as distributions of 3.80 that contain backported bug fixes.  You)
+  AC_MSG_NOTICE(must update GNU make to build Asterisk.)
+  AC_MSG_NOTICE(***************************)
+  exit 1
+fi
+rm -f testMakefile
 
 AC_PATH_PROG([GREP], [grep], :)
 AC_PATH_PROG([AR], [ar], :)
@@ -237,6 +260,15 @@
 	AC_MSG_RESULT(no)
 )
 
+AC_MSG_CHECKING(checking for RTLD_NOLOAD)
+AC_LINK_IFELSE(
+	AC_LANG_PROGRAM([#include <dlfcn.h>],
+			[int foo = RTLD_NOLOAD;]),
+	AC_MSG_RESULT(yes)
+	AC_DEFINE([HAVE_RTLD_NOLOAD], 1, [Define to 1 if your system has a dynamic linker that supports RTLD_NOLOAD.]),
+	AC_MSG_RESULT(no)
+)
+
 AST_GCC_ATTRIBUTE(pure)
 AST_GCC_ATTRIBUTE(malloc)
 AST_GCC_ATTRIBUTE(const)
@@ -908,20 +940,23 @@
 # check for version
    if test "${host_os}" = "SunOS"; then
       if [[ 0x`curl-config --vernum` -ge 0x70907 ]]; then
-         CURLLIB=$(${CURL} --libs)
+         CURL_INCLUDE=$(${CURL} --cflags)
+         CURL_LIB=$(${CURL} --libs)
          PBX_CURL=1
          AC_DEFINE([HAVE_CURL], 1, [Define if your system has the curl libraries.])
       fi
    else
       if [[[ 0x`curl-config --vernum` -ge 0x70907 ]]]; then
-         CURLLIB=$(${CURL} --libs)
+         CURL_INCLUDE=$(${CURL} --cflags)
+         CURL_LIB=$(${CURL} --libs)
          PBX_CURL=1
          AC_DEFINE([HAVE_CURL], 1, [Define if your system has the curl libraries.])
       fi
    fi
 fi
 AC_SUBST(PBX_CURL)
-AC_SUBST(CURLLIB)
+AC_SUBST(CURL_INCLUDE)
+AC_SUBST(CURL_LIB)
 
 AC_CONFIG_FILES([build_tools/menuselect-deps makeopts])
 AC_OUTPUT
@@ -958,13 +993,3 @@
 if test "${cross_compiling}" = "yes"; then
    AC_MSG_NOTICE( Cross Compilation = YES)
 fi
-
-if test ${GNU_MAKE_VERSION_MAJOR} -lt 3 || test ${GNU_MAKE_VERSION_MINOR} -lt 81 ; then
-   AC_MSG_NOTICE()
-   AC_MSG_NOTICE(***** WARNING ******)
-   AC_MSG_NOTICE(You are currently using GNU Make version ${GNU_MAKE_VERSION_MAJOR}.${GNU_MAKE_VERSION_MINOR}.)
-   AC_MSG_NOTICE(The Asterisk build system uses features that may not work correctly prior to 3.81.)
-   AC_MSG_NOTICE(Please consider upgrading GNU Make or you may experience problems.)
-   AC_MSG_NOTICE(********************)
-   AC_MSG_NOTICE()
-fi

Modified: team/mogorman/asterisk-jabber/doc/queues-with-callback-members.txt
URL: http://svn.digium.com/view/asterisk/team/mogorman/asterisk-jabber/doc/queues-with-callback-members.txt?rev=41163&r1=41162&r2=41163&view=diff
==============================================================================
--- team/mogorman/asterisk-jabber/doc/queues-with-callback-members.txt (original)
+++ team/mogorman/asterisk-jabber/doc/queues-with-callback-members.txt Fri Aug 25 16:18:48 2006
@@ -495,7 +495,27 @@
 "1" for that group. If GROUP_COUNT returns 1, then the busy() 
 is returned without actually trying to dial the agent.
 
-
+================ Pre Acknowledgement Message
+
+If you would like to have a pre acknowledge message with option to reject the message
+you can use the following dialplan Macro as a base with the 'M' dial argument.
+
+[macro-screen]
+exten=>s,1,Wait(.25)
+exten=>s,2,Read(ACCEPT|screen-callee-options|1)
+exten=>s,3,Gotoif($[${ACCEPT} = 1] ?50)
+exten=>s,4,Gotoif($[${ACCEPT} = 2] ?30)
+exten=>s,5,Gotoif($[${ACCEPT} = 3] ?40)
+exten=>s,6,Gotoif($[${ACCEPT} = 4] ?30:30)
+exten=>s,30,Set(MACRO_RESULT=CONTINUE)
+exten=>s,40,Read(TEXTEN|custom/screen-exten|)
+exten=>s,41,Gotoif($[${LEN(${TEXTEN})} = 3]?42:45)
+exten=>s,42,Set(MACRO_RESULT=GOTO:from-internal^${TEXTEN}^1)
+exten=>s,45,Gotoif($[${TEXTEN} = 0] ?46:4)
+exten=>s,46,Set(MACRO_RESULT=CONTINUE)
+exten=>s,50,Playback(after-the-tone)
+exten=>s,51,Playback(connected)
+exten=>s,52,Playback(beep)
 
 ================ Caveats 
 

Modified: team/mogorman/asterisk-jabber/doc/speechrec.txt
URL: http://svn.digium.com/view/asterisk/team/mogorman/asterisk-jabber/doc/speechrec.txt?rev=41163&r1=41162&r2=41163&view=diff
==============================================================================
--- team/mogorman/asterisk-jabber/doc/speechrec.txt (original)
+++ team/mogorman/asterisk-jabber/doc/speechrec.txt Fri Aug 25 16:18:48 2006
@@ -169,7 +169,7 @@
 	exten => s,7,Set(CONFIRM=${SPEECH_TEXT(0)})
 	exten => s,8,GotoIf($["${SPEECH_TEXT(0)}" = "1"]?9:10)
 	exten => s,9,Set(CONFIRM=yes)
-	exten => s,10,Set(${CONFIRMED}=${OLDTEXT0})
+	exten => s,10,Set(CONFIRMED=${OLDTEXT0})
 	exten => s,11,SpeechDeactivateGrammar(yes_no)
 
 * The Asterisk Speech Recognition C API

Modified: team/mogorman/asterisk-jabber/include/asterisk/autoconfig.h.in
URL: http://svn.digium.com/view/asterisk/team/mogorman/asterisk-jabber/include/asterisk/autoconfig.h.in?rev=41163&r1=41162&r2=41163&view=diff
==============================================================================
--- team/mogorman/asterisk-jabber/include/asterisk/autoconfig.h.in (original)
+++ team/mogorman/asterisk-jabber/include/asterisk/autoconfig.h.in Fri Aug 25 16:18:48 2006
@@ -269,6 +269,10 @@
 
 /* Define to 1 if you have the `rint' function. */
 #undef HAVE_RINT
+
+/* Define to 1 if your system has a dynamic linker that supports RTLD_NOLOAD.
+   */
+#undef HAVE_RTLD_NOLOAD
 
 /* Define to 1 if you have the `select' function. */
 #undef HAVE_SELECT

Modified: team/mogorman/asterisk-jabber/include/asterisk/linkedlists.h
URL: http://svn.digium.com/view/asterisk/team/mogorman/asterisk-jabber/include/asterisk/linkedlists.h?rev=41163&r1=41162&r2=41163&view=diff
==============================================================================
--- team/mogorman/asterisk-jabber/include/asterisk/linkedlists.h (original)
+++ team/mogorman/asterisk-jabber/include/asterisk/linkedlists.h Fri Aug 25 16:18:48 2006
@@ -462,6 +462,23 @@
 } while (0)
 
 /*!
+  \brief Appends a whole list to the tail of a list.
+  \param head This is a pointer to the list head structure
+  \param list This is a pointer to the list to be appended.
+  \param field This is the name of the field (declared using AST_LIST_ENTRY())
+  used to link entries of this list together.
+ */
+#define AST_LIST_APPEND_LIST(head, list, field) do {			\
+      if (!(head)->first) {						\
+		(head)->first = (list)->first;				\
+		(head)->last = (list)->last;				\
+      } else {								\
+		(head)->last->field.next = (list)->first;		\
+		(head)->last = (list)->last;				\
+      }									\
+} while (0)
+
+/*!
   \brief Removes and returns the head entry from a list.
   \param head This is a pointer to the list head structure
   \param field This is the name of the field (declared using AST_LIST_ENTRY())

Modified: team/mogorman/asterisk-jabber/include/asterisk/paths.h
URL: http://svn.digium.com/view/asterisk/team/mogorman/asterisk-jabber/include/asterisk/paths.h?rev=41163&r1=41162&r2=41163&view=diff
==============================================================================
--- team/mogorman/asterisk-jabber/include/asterisk/paths.h (original)
+++ team/mogorman/asterisk-jabber/include/asterisk/paths.h Fri Aug 25 16:18:48 2006
@@ -12,7 +12,7 @@
  */
 
 /*! \file
- * \brief Asterisk main include file. File version handling, generic pbx functions.
+ * \brief Asterisk file paths, configured in asterisk.conf
  */
 
 #ifndef _ASTERISK_PATHS_H

Modified: team/mogorman/asterisk-jabber/main/asterisk.c
URL: http://svn.digium.com/view/asterisk/team/mogorman/asterisk-jabber/main/asterisk.c?rev=41163&r1=41162&r2=41163&view=diff
==============================================================================
--- team/mogorman/asterisk-jabber/main/asterisk.c (original)
+++ team/mogorman/asterisk-jabber/main/asterisk.c Fri Aug 25 16:18:48 2006
@@ -469,10 +469,12 @@
 	}
 	ast_cli(fd, "profile values (%d, allocated %d)\n-------------------\n",
 		prof_data->entries, prof_data->max_size);
+	ast_cli(fd, "%6s   %8s  %10s %12s %12s  %s\n", "ID", "Scale", "Events",
+			"Value", "Average", "Name");
 	for (i = min; i < max; i++) {
 		struct profile_entry *e = &prof_data->e[i];
 		if (!search || strstr(prof_data->e[i].name, search))
-		    ast_cli(fd, "%6d: [%8ld] %10ld %12lld %12lld %s\n",
+		    ast_cli(fd, "%6d: [%8ld] %10ld %12lld %12lld  %s\n",
 			i,
 			(long)e->scale,
 			(long)e->events, (long long)e->value,

Modified: team/mogorman/asterisk-jabber/main/channel.c
URL: http://svn.digium.com/view/asterisk/team/mogorman/asterisk-jabber/main/channel.c?rev=41163&r1=41162&r2=41163&view=diff
==============================================================================
--- team/mogorman/asterisk-jabber/main/channel.c (original)
+++ team/mogorman/asterisk-jabber/main/channel.c Fri Aug 25 16:18:48 2006
@@ -3046,7 +3046,7 @@
 
 	AST_LIST_TRAVERSE_SAFE_BEGIN(&original->varshead, varptr, entries) {
 		if (!strncmp(ast_var_name(varptr), GROUP_CATEGORY_PREFIX, strlen(GROUP_CATEGORY_PREFIX))) {
-			AST_LIST_REMOVE(&original->varshead, varptr, entries);
+			AST_LIST_REMOVE_CURRENT(&original->varshead, entries);
 			ast_var_delete(varptr);
 		}
 	}
@@ -3055,7 +3055,7 @@
 	/* Append variables from clone channel into original channel */
 	/* XXX Is this always correct?  We have to in order to keep MACROS working XXX */
 	if (AST_LIST_FIRST(&clone->varshead))
-		AST_LIST_INSERT_TAIL(&original->varshead, AST_LIST_FIRST(&clone->varshead), entries);
+		AST_LIST_APPEND_LIST(&original->varshead, &clone->varshead, entries);
 }
 
 /*!

Modified: team/mogorman/asterisk-jabber/main/file.c
URL: http://svn.digium.com/view/asterisk/team/mogorman/asterisk-jabber/main/file.c?rev=41163&r1=41162&r2=41163&view=diff
==============================================================================
--- team/mogorman/asterisk-jabber/main/file.c (original)
+++ team/mogorman/asterisk-jabber/main/file.c Fri Aug 25 16:18:48 2006
@@ -417,6 +417,7 @@
 					chan->stream = s;
 				else
 					chan->vstream = s;
+				free(fn);
 				break;
 			}
 			switch (action) {

Modified: team/mogorman/asterisk-jabber/main/loader.c
URL: http://svn.digium.com/view/asterisk/team/mogorman/asterisk-jabber/main/loader.c?rev=41163&r1=41162&r2=41163&view=diff
==============================================================================
--- team/mogorman/asterisk-jabber/main/loader.c (original)
+++ team/mogorman/asterisk-jabber/main/loader.c Fri Aug 25 16:18:48 2006
@@ -324,7 +324,7 @@
 static void unload_dynamic_module(struct ast_module *mod)
 {
 	if (mod->lib)
-		dlclose(mod->lib);
+		while (!dlclose(mod->lib));
 	/* WARNING: the structure pointed to by mod is now gone! */
 }
 
@@ -368,7 +368,7 @@
 	*/
 	if (resource_being_loaded != (mod = AST_LIST_LAST(&module_list))) {
 		/* no, it did not, so close it and return */
-		dlclose(lib);
+		while (!dlclose(lib));
 		/* note that the module's destructor will call ast_module_unregister(),
 		   which will free the structure we allocated in resource_being_loaded */
 		return NULL;
@@ -376,15 +376,27 @@
 
 	wants_global = ast_test_flag(mod->info, AST_MODFLAG_GLOBAL_SYMBOLS);
 
-	/* we are done with this first load, so clean up and start over */
-
-	dlclose(lib);
-	resource_being_loaded = NULL;
-
 	/* if we are being asked only to load modules that provide global symbols,
 	   and this one does not, then close it and return */
-	if (global_symbols_only && !wants_global)
+	if (global_symbols_only && !wants_global) {
+		while (!dlclose(lib));
 		return NULL;
+	}
+
+	/* if the system supports RTLD_NOLOAD, we can just 'promote' the flags
+	   on the already-opened library to what we want... if not, we have to
+	   close it and start over
+	*/
+#if HAVE_RTLD_NOLOAD
+	if (!dlopen(fn, RTLD_NOLOAD | (wants_global ? RTLD_LAZY | RTLD_GLOBAL : RTLD_NOW | RTLD_LOCAL))) {
+		ast_log(LOG_WARNING, "%s\n", dlerror());
+		while (!dlclose(lib));
+		free(resource_being_loaded);
+		return NULL;
+	}
+#else
+	while (!dlclose(lib));
+	resource_being_loaded = NULL;
 
 	/* start the load process again */
 
@@ -402,6 +414,8 @@
 	/* since the module was successfully opened, and it registered itself
 	   the previous time we did that, we're going to assume it worked this
 	   time too :) */
+#endif
+
 	AST_LIST_LAST(&module_list)->lib = lib;
 	resource_being_loaded = NULL;
 

Modified: team/mogorman/asterisk-jabber/main/pbx.c
URL: http://svn.digium.com/view/asterisk/team/mogorman/asterisk-jabber/main/pbx.c?rev=41163&r1=41162&r2=41163&view=diff
==============================================================================
--- team/mogorman/asterisk-jabber/main/pbx.c (original)
+++ team/mogorman/asterisk-jabber/main/pbx.c Fri Aug 25 16:18:48 2006
@@ -5360,9 +5360,9 @@
 	memset(buf, 0, size);
 
 	AST_LIST_TRAVERSE(&chan->varshead, variables, entries) {
-		if(variables &&
-		   (var=ast_var_name(variables)) && (val=ast_var_value(variables)) &&
-		   !ast_strlen_zero(var) && !ast_strlen_zero(val)) {
+		if ((var=ast_var_name(variables)) && (val=ast_var_value(variables))
+		   /* && !ast_strlen_zero(var) && !ast_strlen_zero(val) */
+		   ) {
 			if (ast_build_string(&buf, &size, "%s=%s\n", var, val)) {
 				ast_log(LOG_ERROR, "Data Buffer Size Exceeded!\n");
 				break;

Modified: team/mogorman/asterisk-jabber/main/utils.c
URL: http://svn.digium.com/view/asterisk/team/mogorman/asterisk-jabber/main/utils.c?rev=41163&r1=41162&r2=41163&view=diff
==============================================================================
--- team/mogorman/asterisk-jabber/main/utils.c (original)
+++ team/mogorman/asterisk-jabber/main/utils.c Fri Aug 25 16:18:48 2006
@@ -363,7 +363,7 @@
 		byte |= *(src++);
 		bits += 8;
 		cntin++;
-		if ((bits == 24) && (cnt + 4 < max)) {
+		if ((bits == 24) && (cnt + 4 <= max)) {
 			*dst++ = base64[(byte >> 18) & 0x3f];
 			*dst++ = base64[(byte >> 12) & 0x3f];
 			*dst++ = base64[(byte >> 6) & 0x3f];
@@ -379,7 +379,7 @@
 			col = 0;
 		}
 	}
-	if (bits && (cnt + 4 < max)) {
+	if (bits && (cnt + 4 <= max)) {
 		/* Add one last character for the remaining bits, 
 		   padding the rest with 0 */
 		byte <<= 24 - bits;

Modified: team/mogorman/asterisk-jabber/makeopts.in
URL: http://svn.digium.com/view/asterisk/team/mogorman/asterisk-jabber/makeopts.in?rev=41163&r1=41162&r2=41163&view=diff
==============================================================================
--- team/mogorman/asterisk-jabber/makeopts.in (original)
+++ team/mogorman/asterisk-jabber/makeopts.in Fri Aug 25 16:18:48 2006
@@ -53,7 +53,8 @@
 ASOUND_INCLUDE=@ALSA_INCLUDE@
 ASOUND_LIB=@ALSA_LIB@
 
-CURL_LIB=@CURLLIB@
+CURL_INCLUDE=@CURL_INCLUDE@
+CURL_LIB=@CURL_LIB@
 
 CURSES_INCLUDE=@CURSES_INCLUDE@
 CURSES_LIB=@CURSES_LIB@

Modified: team/mogorman/asterisk-jabber/pbx/pbx_ael.c
URL: http://svn.digium.com/view/asterisk/team/mogorman/asterisk-jabber/pbx/pbx_ael.c?rev=41163&r1=41162&r2=41163&view=diff
==============================================================================
--- team/mogorman/asterisk-jabber/pbx/pbx_ael.c (original)
+++ team/mogorman/asterisk-jabber/pbx/pbx_ael.c Fri Aug 25 16:18:48 2006
@@ -58,11 +58,10 @@
 
 static char *config = "extensions.ael";
 static char *registrar = "pbx_ael";
+static int pbx_load_module(void);
 
 static int errs, warns;
-#ifndef STANDALONE_AEL
 static int notes;
-#endif
 
 #ifndef AAL_ARGCHECK
 /* for the time being, short circuit all the AAL related structures
@@ -1009,6 +1008,46 @@
 		e = s;
 }
 
+static int check_break(pval *item)
+{
+	pval *p = item;
+	
+	while( p && p->type != PV_MACRO && p->type != PV_CONTEXT ) /* early cutout, sort of */ {
+		/* a break is allowed in WHILE, FOR, CASE, DEFAULT, PATTERN; otherwise, it don't make
+		   no sense */
+		if( p->type == PV_CASE || p->type == PV_DEFAULT || p->type == PV_PATTERN 
+			|| p->type == PV_WHILE || p->type == PV_FOR   ) {
+			return 1;
+		}
+		p = p->dad;
+	}
+	ast_log(LOG_ERROR,"Error: file %s, line %d-%d: 'break' not in switch, for, or while statement!\n",
+			item->filename, item->startline, item->endline);
+	errs++;
+	
+	return 0;
+}
+
+static int check_continue(pval *item)
+{
+	pval *p = item;
+	
+	while( p && p->type != PV_MACRO && p->type != PV_CONTEXT ) /* early cutout, sort of */ {
+		/* a break is allowed in WHILE, FOR, CASE, DEFAULT, PATTERN; otherwise, it don't make
+		   no sense */
+		if( p->type == PV_WHILE || p->type == PV_FOR   ) {
+			return 1;
+		}
+		p = p->dad;
+	}
+	ast_log(LOG_ERROR,"Error: file %s, line %d-%d: 'continue' not in 'for' or 'while' statement!\n",
+			item->filename, item->startline, item->endline);
+	errs++;
+	
+	return 0;
+}
+
+
 /* general purpose goto finder */
 
 static void check_label(pval *item)
@@ -2092,7 +2131,6 @@
 #endif
 }
 
-#ifndef STANDALONE_AEL
 static void check_context_names(void)
 {
 	pval *i,*j;
@@ -2111,7 +2149,6 @@
 		}
 	}
 }
-#endif
 
 static void check_abstract_reference(pval *abstract_context)
 {
@@ -2438,6 +2475,7 @@
 	case PV_BREAK:
 		/* fields: none
 		*/
+		check_break(item);
 		break;
 			
 	case PV_RETURN:
@@ -2448,6 +2486,7 @@
 	case PV_CONTINUE:
 		/* fields: none
 		*/
+		check_continue(item);
 		break;
 			
 	case PV_RANDOM:
@@ -2576,7 +2615,6 @@
 	}
 }
 
-#ifndef STANDALONE_AEL
 static void ael2_semantic_check(pval *item, int *arg_errs, int *arg_warns, int *arg_notes)
 {
 	
@@ -2607,7 +2645,6 @@
 	*arg_warns = warns;
 	*arg_notes = notes;
 }
-#endif
 
 /* =============================================================================================== */

[... 160 lines stripped ...]


More information about the asterisk-commits mailing list