[asterisk-commits] branch oej/siptransfer r27720 - in /team/oej/siptransfer: ./ apps/ build_tool...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed May 17 00:27:17 MST 2006


Author: oej
Date: Wed May 17 02:27:16 2006
New Revision: 27720

URL: http://svn.digium.com/view/asterisk?rev=27720&view=rev
Log:
- Updates
- remove the channel fix for letting the sip pvt stay alive after masq, trying to fix this in sip_fixup instead

Added:
    team/oej/siptransfer/build_tools/make_buildopts_h
      - copied unchanged from r27306, trunk/build_tools/make_buildopts_h
Modified:
    team/oej/siptransfer/   (props changed)
    team/oej/siptransfer/.cleancount
    team/oej/siptransfer/Makefile
    team/oej/siptransfer/app.c
    team/oej/siptransfer/apps/Makefile
    team/oej/siptransfer/apps/app_amd.c
    team/oej/siptransfer/apps/app_authenticate.c
    team/oej/siptransfer/apps/app_chanspy.c
    team/oej/siptransfer/apps/app_db.c
    team/oej/siptransfer/apps/app_dial.c
    team/oej/siptransfer/apps/app_dictate.c
    team/oej/siptransfer/apps/app_directory.c
    team/oej/siptransfer/apps/app_disa.c
    team/oej/siptransfer/apps/app_exec.c
    team/oej/siptransfer/apps/app_externalivr.c
    team/oej/siptransfer/apps/app_festival.c
    team/oej/siptransfer/apps/app_hasnewvoicemail.c
    team/oej/siptransfer/apps/app_image.c
    team/oej/siptransfer/apps/app_meetme.c
    team/oej/siptransfer/apps/app_mixmonitor.c
    team/oej/siptransfer/apps/app_osplookup.c
    team/oej/siptransfer/apps/app_page.c
    team/oej/siptransfer/apps/app_playback.c
    team/oej/siptransfer/apps/app_privacy.c
    team/oej/siptransfer/apps/app_queue.c
    team/oej/siptransfer/apps/app_random.c
    team/oej/siptransfer/apps/app_read.c
    team/oej/siptransfer/apps/app_readfile.c
    team/oej/siptransfer/apps/app_realtime.c
    team/oej/siptransfer/apps/app_record.c
    team/oej/siptransfer/apps/app_sayunixtime.c
    team/oej/siptransfer/apps/app_senddtmf.c
    team/oej/siptransfer/apps/app_sendtext.c
    team/oej/siptransfer/apps/app_setcallerid.c
    team/oej/siptransfer/apps/app_skel.c
    team/oej/siptransfer/apps/app_speech_utils.c
    team/oej/siptransfer/apps/app_stack.c
    team/oej/siptransfer/apps/app_talkdetect.c
    team/oej/siptransfer/apps/app_transfer.c
    team/oej/siptransfer/apps/app_url.c
    team/oej/siptransfer/apps/app_userevent.c
    team/oej/siptransfer/apps/app_verbose.c
    team/oej/siptransfer/apps/app_voicemail.c
    team/oej/siptransfer/apps/app_while.c
    team/oej/siptransfer/apps/app_zapras.c
    team/oej/siptransfer/apps/app_zapscan.c
    team/oej/siptransfer/asterisk.c
    team/oej/siptransfer/build_tools/Makefile
    team/oej/siptransfer/build_tools/cflags.xml
    team/oej/siptransfer/build_tools/menuselect.c
    team/oej/siptransfer/build_tools/menuselect.h
    team/oej/siptransfer/build_tools/menuselect_curses.c
    team/oej/siptransfer/build_tools/prep_moduledeps
    team/oej/siptransfer/callerid.c
    team/oej/siptransfer/channel.c
    team/oej/siptransfer/channels/Makefile
    team/oej/siptransfer/channels/chan_agent.c
    team/oej/siptransfer/channels/chan_alsa.c
    team/oej/siptransfer/channels/chan_features.c
    team/oej/siptransfer/channels/chan_h323.c
    team/oej/siptransfer/channels/chan_iax2.c
    team/oej/siptransfer/channels/chan_local.c
    team/oej/siptransfer/channels/chan_mgcp.c
    team/oej/siptransfer/channels/chan_nbs.c
    team/oej/siptransfer/channels/chan_oss.c
    team/oej/siptransfer/channels/chan_phone.c
    team/oej/siptransfer/channels/chan_sip.c
    team/oej/siptransfer/channels/chan_skinny.c
    team/oej/siptransfer/channels/chan_vpb.c
    team/oej/siptransfer/channels/chan_zap.c
    team/oej/siptransfer/channels/iax2.h
    team/oej/siptransfer/cli.c
    team/oej/siptransfer/configs/iax.conf.sample
    team/oej/siptransfer/configs/manager.conf.sample
    team/oej/siptransfer/configs/say.conf.sample
    team/oej/siptransfer/configs/sip.conf.sample
    team/oej/siptransfer/configure.ac
    team/oej/siptransfer/dnsmgr.c
    team/oej/siptransfer/doc/cliprompt.txt
    team/oej/siptransfer/dsp.c
    team/oej/siptransfer/enum.c
    team/oej/siptransfer/funcs/func_cdr.c
    team/oej/siptransfer/funcs/func_channel.c
    team/oej/siptransfer/funcs/func_cut.c
    team/oej/siptransfer/funcs/func_logic.c
    team/oej/siptransfer/image.c
    team/oej/siptransfer/include/   (props changed)
    team/oej/siptransfer/include/asterisk/   (props changed)
    team/oej/siptransfer/include/asterisk/ael_structs.h
    team/oej/siptransfer/include/asterisk/app.h
    team/oej/siptransfer/include/asterisk/astosp.h
    team/oej/siptransfer/include/asterisk/channel.h
    team/oej/siptransfer/include/asterisk/frame.h
    team/oej/siptransfer/include/asterisk/linkedlists.h
    team/oej/siptransfer/include/asterisk/lock.h
    team/oej/siptransfer/include/asterisk/module.h
    team/oej/siptransfer/include/asterisk/pbx.h
    team/oej/siptransfer/include/asterisk/rtp.h
    team/oej/siptransfer/include/asterisk/translate.h
    team/oej/siptransfer/include/asterisk/utils.h
    team/oej/siptransfer/indications.c
    team/oej/siptransfer/loader.c
    team/oej/siptransfer/logger.c
    team/oej/siptransfer/makeopts.in
    team/oej/siptransfer/manager.c
    team/oej/siptransfer/mxml/   (props changed)
    team/oej/siptransfer/netsock.c
    team/oej/siptransfer/pbx.c
    team/oej/siptransfer/pbx/ael/   (props changed)
    team/oej/siptransfer/pbx/pbx_config.c
    team/oej/siptransfer/pbx/pbx_dundi.c
    team/oej/siptransfer/pbx/pbx_realtime.c
    team/oej/siptransfer/res/res_agi.c
    team/oej/siptransfer/res/res_clioriginate.c
    team/oej/siptransfer/res/res_config_odbc.c
    team/oej/siptransfer/res/res_config_pgsql.c
    team/oej/siptransfer/res/res_convert.c
    team/oej/siptransfer/res/res_features.c
    team/oej/siptransfer/res/res_monitor.c
    team/oej/siptransfer/res/res_smdi.c
    team/oej/siptransfer/rtp.c
    team/oej/siptransfer/say.c
    team/oej/siptransfer/strcompat.c
    team/oej/siptransfer/utils/Makefile

Propchange: team/oej/siptransfer/
------------------------------------------------------------------------------
Binary property 'branch-1.2-blocked' - no diff available.

Propchange: team/oej/siptransfer/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Propchange: team/oej/siptransfer/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed May 17 02:27:16 2006
@@ -19,9 +19,4 @@
 config.status
 config.log
 makeopts.xml
-install-sh
-configure
-mkinstalldirs
 autom4te.cache
-missing
-aclocal.m4

Propchange: team/oej/siptransfer/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed May 17 02:27:16 2006
@@ -1,1 +1,1 @@
-/trunk:1-25551
+/trunk:1-27339

Modified: team/oej/siptransfer/.cleancount
URL: http://svn.digium.com/view/asterisk/team/oej/siptransfer/.cleancount?rev=27720&r1=27719&r2=27720&view=diff
==============================================================================
--- team/oej/siptransfer/.cleancount (original)
+++ team/oej/siptransfer/.cleancount Wed May 17 02:27:16 2006
@@ -1,1 +1,1 @@
-15
+16

Modified: team/oej/siptransfer/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/siptransfer/Makefile?rev=27720&r1=27719&r2=27720&view=diff
==============================================================================
--- team/oej/siptransfer/Makefile (original)
+++ team/oej/siptransfer/Makefile Wed May 17 02:27:16 2006
@@ -24,18 +24,6 @@
 #CROSS_PROC=arm
 #SUB_PROC=xscale # or maverick
 
-# Pentium Pro Optimize
-#PROC=i686
-
-# Pentium & VIA processors optimize
-#PROC=i586
-
-#PROC=k6
-#PROC=ppc
-
-CC=$(CROSS_COMPILE)gcc
-HOST_CC=gcc
-
 ifeq ($(CROSS_COMPILE),)
   OSARCH=$(shell uname -s)
   PROC?=$(shell uname -m)
@@ -69,37 +57,7 @@
 OVERWRITE=y
 
 # Include debug and macro symbols in the executables (-g) and profiling info (-pg)
-DEBUG=-g3 #-pg
-
-# Set NOCRYPTO to yes if you do not want to have crypto support or dependencies
-#NOCRYPTO=yes
-
-# If you are running a radio application, define RADIO_RELAX so that the DTMF
-# will be received more reliably
-#OPTIONS += -DRADIO_RELAX
-
-# If you don't have a lot of memory (e.g. embedded Asterisk), define LOW_MEMORY
-# to reduce the size of certain static buffers
-#ifneq ($(CROSS_COMPILE),)
-#OPTIONS += -DLOW_MEMORY
-#endif
-
-# Asterisk SMDI integration
-WITH_SMDI = 1
-
-# Optional debugging parameters
-DEBUG_THREADS = #-DDUMP_SCHEDULER #-DDEBUG_SCHEDULER #-DDEBUG_THREADS #-DDO_CRASH #-DDETECT_DEADLOCKS
-
-# If you want to debug channel locking, try this (depends on code using
-# ast_channel_lock and companions to work)
-DEBUG_THREADS += #-DDEBUG_CHANNEL_LOCKS
-
-# Uncomment next one to enable ast_frame tracing (for debugging)
-TRACE_FRAMES = #-DTRACE_FRAMES
-
-# Where to install asterisk after compiling
-# Default -> leave empty
-INSTALL_PREFIX?=
+DEBUG=-g3
 
 # Staging directory
 # Files are copied here temporarily during the install process
@@ -110,16 +68,16 @@
 #DESTDIR?=/tmp/asterisk
 
 # Original busydetect routine
-BUSYDETECT = #-DBUSYDETECT
+#BUSYDETECT = -DBUSYDETECT
 
 # Improved busydetect routine, comment the previous one if you use this one
-BUSYDETECT+= #-DBUSYDETECT_MARTIN 
+#BUSYDETECT+= -DBUSYDETECT_MARTIN 
 # Detect the busy signal looking only at tone lengths
 # For example if you have 3 beeps 100ms tone, 100ms silence separated by 500 ms of silence
-BUSYDETECT+= #-DBUSYDETECT_TONEONLY
+#BUSYDETECT+= -DBUSYDETECT_TONEONLY
 # Enforce the detection of busy signal (get rid of false hangups)
 # Don't use together with -DBUSYDETECT_TONEONLY
-BUSYDETECT+= #-DBUSYDETECT_COMPARE_TONE_AND_SILENCE
+#BUSYDETECT+= -DBUSYDETECT_COMPARE_TONE_AND_SILENCE
 
 # Define standard directories for various platforms
 # These apply if they are not redefined in asterisk.conf 
@@ -195,14 +153,13 @@
   include makeopts
 endif
 
-ASTCFLAGS+=$(MENUSELECT_CFLAGS)
 TOPDIR_CFLAGS=-include include/autoconfig.h -Iinclude
 MOD_SUBDIR_CFLAGS=-include ../include/autoconfig.h -I../include -I..
 OTHER_SUBDIR_CFLAGS=-include ../include/autoconfig.h -I../include -I..
 
 #   *CLI> show memory allocations [filename]
 #   *CLI> show memory summary [filename]
-ifneq ($(findstring -DMALLOC_DEBUG,$(ASTCFLAGS)),)
+ifneq ($(findstring MALLOC_DEBUG,$(MENUSELECT_CFLAGS)),)
   TOPDIR_CFLAGS+=-include include/asterisk/astmm.h
   MOD_SUBDIR_CFLAGS+=-include ../include/asterisk/astmm.h
 endif
@@ -252,7 +209,7 @@
   ID=/usr/xpg4/bin/id
 endif
 
-ASTCFLAGS+=-pipe  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG) $(INCLUDE) #-DMAKE_VALGRIND_HAPPY
+ASTCFLAGS+=-pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG)
 ASTCFLAGS+=$(OPTIMIZE)
 
 ifeq ($(AST_DEVMODE),yes)
@@ -260,7 +217,7 @@
 endif
 
 ifeq ($(shell gcc -v 2>&1 | grep 'gcc version' | cut -f3 -d' ' | cut -f1 -d.),4)
-ASTCFLAGS+= -Wno-pointer-sign
+ASTCFLAGS+=-Wno-pointer-sign
 endif
 ASTOBJ=-o asterisk
 
@@ -287,8 +244,7 @@
 endif # FreeBSD
 
 ifeq ($(OSARCH),NetBSD)
-  ASTCFLAGS+=-pthread
-  INCLUDE+=-I$(CROSS_COMPILE_TARGET)/usr/pkg/include
+  AST_CFLAGS+=-pthread -I$(CROSS_COMPILE_TARGET)/usr/pkg/include
   MPG123TARG=netbsd
 endif
 
@@ -297,8 +253,7 @@
 endif
 
 ifeq ($(OSARCH),SunOS)
-  ASTCFLAGS+=-Wcast-align -DSOLARIS
-  INCLUDE+=-Iinclude/solaris-compat -I$(CROSS_COMPILE_TARGET)/usr/local/ssl/include
+  ASTCFLAGS+=-Wcast-align -DSOLARIS -Iinclude/solaris-compat -I$(CROSS_COMPILE_TARGET)/usr/local/ssl/include
 endif
 
 LIBEDIT=editline/libedit.a
@@ -323,13 +278,9 @@
   endif
 endif
 
-ASTCFLAGS+= $(DEBUG_THREADS)
-ASTCFLAGS+= $(TRACE_FRAMES)
-ASTCFLAGS+= $(MALLOC_DEBUG)
-ASTCFLAGS+= $(BUSYDETECT)
-ASTCFLAGS+= $(OPTIONS)
+ASTCFLAGS+=$(MALLOC_DEBUG)$(BUSYDETECT)$(OPTIONS)
 ifeq ($(findstring dont-optimize,$(MAKECMDGOALS)),)
-ASTCFLAGS+= -fomit-frame-pointer 
+ASTCFLAGS+=-fomit-frame-pointer
 endif
 
 MOD_SUBDIRS=res channels pbx apps codecs formats cdr funcs
@@ -348,11 +299,11 @@
 # we need to link in the objects statically, not as a library, because
 # otherwise modules will not have them available if none of the static
 # objects use it.
-OBJS+= stdtime/localtime.o
+OBJS+=stdtime/localtime.o
 
 # At the moment say.o is an optional component which can be overridden
 # by a module.
-OBJS+= say.o
+OBJS+=say.o
 
 ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/sys/poll.h),)
   OBJS+= poll.o
@@ -365,9 +316,9 @@
 endif
 
 ifeq ($(OSARCH),Linux)
-  LIBS+=-ldl -lpthread -lncurses -lm -lresolv  #-lnjamd
+  LIBS+=-ldl -lpthread $(EDITLINE_LIBS) -lm -lresolv  #-lnjamd
 else
-  LIBS+=-lncurses -lm
+  LIBS+=$(EDITLINE_LIBS) -lm
 endif
 
 ifeq ($(OSARCH),Darwin)
@@ -395,22 +346,23 @@
 endif
 
 ifeq ($(OSARCH),NetBSD)
-  LIBS+=-lpthread -lcrypto -lm -L$(CROSS_COMPILE_TARGET)/usr/pkg/lib -lncurses
+  LIBS+=-lpthread -lcrypto -lm -L$(CROSS_COMPILE_TARGET)/usr/pkg/lib $(EDITLINE_LIBS)
 endif
 
 ifeq ($(OSARCH),OpenBSD)
-  LIBS+=-lcrypto -lpthread -lm -lncurses
+  LIBS+=-lcrypto -lpthread -lm $(EDITLINE_LIBS)
 endif
 
 ifeq ($(OSARCH),SunOS)
   LIBS+=-lpthread -ldl -lnsl -lsocket -lresolv -L$(CROSS_COMPILE_TARGET)/usr/local/ssl/lib
   OBJS+=strcompat.o
+  MENUSELECT_OBJS+=strcompat.o
   ASTLINK=
   SOLINK=-shared -fpic -L$(CROSS_COMPILE_TARGET)/usr/local/ssl/lib
 endif
 
 ifeq ($(MAKETOPLEVEL),$(MAKELEVEL))
-  CFLAGS+=$(ASTCFLAGS) $(TOPDIR_CFLAGS)
+  CFLAGS+=$(TOPDIR_CFLAGS)$(ASTCFLAGS)
 endif
 
 # This is used when generating the doxygen documentation
@@ -431,12 +383,9 @@
 	@echo " +               make install                +"  
 	@echo " +-------------------------------------------+"  
 
-all: include/autoconfig.h menuselect.makeopts cleantest depend asterisk subdirs
-
-configure:
-	- at ./bootstrap.sh
-
-include/autoconfig.h: configure
+all: cleantest config.status menuselect.makeopts depend asterisk subdirs
+
+config.status: configure
 	@CFLAGS="" ./configure
 	@echo "****"
 	@echo "**** The configure script was just executed, so 'make' needs to be"
@@ -481,11 +430,11 @@
   include .tags-depend
 endif
 
-ast_expr2.c:
-	bison -d --name-prefix=ast_yy ast_expr2.y -o ast_expr2.c
+ast_expr2.c ast_expr2.h:
+	bison -o $@ -d --name-prefix=ast_yy ast_expr2.y
 
 ast_expr2f.c:
-	flex --full ast_expr2.fl
+	flex -o $@ --full ast_expr2.fl
 
 testexpr2: ast_expr2f.c ast_expr2.c ast_expr2.h
 	gcc -g -c -DSTANDALONE ast_expr2f.c
@@ -514,23 +463,30 @@
 	docbook2txt asterisk.sgml
 
 defaults.h: makeopts
-	build_tools/make_defaults_h > $@.tmp
-	if cmp -s $@.tmp $@ ; then echo ; else \
+	@build_tools/make_defaults_h > $@.tmp
+	@if cmp -s $@.tmp $@ ; then echo ; else \
 		mv $@.tmp $@ ; \
 	fi
-	rm -f $@.tmp
+	@rm -f $@.tmp
 
 include/asterisk/version.h:
-	build_tools/make_version_h > $@.tmp
-	if cmp -s $@.tmp $@ ; then echo; else \
+	@build_tools/make_version_h > $@.tmp
+	@if cmp -s $@.tmp $@ ; then echo; else \
 		mv $@.tmp $@ ; \
 	fi
-	rm -f $@.tmp
+	@rm -f $@.tmp
+
+include/asterisk/buildopts.h: menuselect.makeopts
+	@build_tools/make_buildopts_h > $@.tmp
+	@if cmp -s $@.tmp $@ ; then echo; else \
+		mv $@.tmp $@ ; \
+	fi
+	@rm -f $@.tmp
 
 stdtime/libtime.a:
-	CFLAGS="$(ASTCFLAGS) $(MOD_SUBDIR_CFLAGS)" $(MAKE) -C stdtime libtime.a
-
-asterisk: editline/libedit.a db1-ast/libdb1.a stdtime/libtime.a $(OBJS)
+	CFLAGS="$(MOD_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) -C stdtime libtime.a
+
+asterisk: include/asterisk/buildopts.h editline/libedit.a db1-ast/libdb1.a stdtime/libtime.a $(OBJS)
 	build_tools/make_build_h > include/asterisk/build.h.tmp
 	if cmp -s include/asterisk/build.h.tmp include/asterisk/build.h ; then echo ; else \
 		mv include/asterisk/build.h.tmp include/asterisk/build.h ; \
@@ -543,16 +499,16 @@
 	$(CC) $(AUDIO_LIBS) -o muted muted.o
 
 subdirs: 
-	for x in $(MOD_SUBDIRS); do CFLAGS="$(ASTCFLAGS) $(MOD_SUBDIR_CFLAGS)" $(MAKE) -C $$x || exit 1 ; done
-	CFLAGS="$(ASTCFLAGS) $(OTHER_SUBDIR_CFLAGS)" $(MAKE) -C utils
-	CFLAGS="$(ASTCFLAGS) $(OTHER_SUBDIR_CFLAGS)" $(MAKE) -C agi
+	@for x in $(MOD_SUBDIRS); do CFLAGS="$(MOD_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) -C $$x || exit 1 ; done
+	@CFLAGS="$(OTHER_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) -C utils
+	@CFLAGS="$(OTHER_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) -C agi
 
 clean-depend:
-	for x in $(SUBDIRS); do $(MAKE) -C $$x clean-depend || exit 1 ; done
+	@for x in $(SUBDIRS); do $(MAKE) -C $$x clean-depend || exit 1 ; done
 	rm -f .depend .tags-depend
 
 clean: clean-depend
-	for x in $(SUBDIRS); do $(MAKE) -C $$x clean || exit 1 ; done
+	@for x in $(SUBDIRS); do $(MAKE) -C $$x clean || exit 1 ; done
 	rm -f *.o *.so asterisk
 	rm -f defaults.h
 	rm -f include/asterisk/build.h
@@ -569,6 +525,7 @@
 	rm -f menuselect.makeopts makeopts makeopts.xml
 	rm -f config.log config.status
 	rm -f include/autoconfig.h
+	rm -f include/asterisk/buildopts.h
 	$(MAKE) -C mxml clean
 	$(MAKE) -C build_tools dist-clean
 
@@ -677,7 +634,7 @@
 	if [ -f asterisk.dll ]; then $(INSTALL) -m 755 asterisk.dll $(DESTDIR)$(ASTSBINDIR)/; fi
 	ln -sf asterisk $(DESTDIR)$(ASTSBINDIR)/rasterisk
 	$(INSTALL) -m 755 contrib/scripts/astgenkey $(DESTDIR)$(ASTSBINDIR)/
-	$(INSTALL) -m 755 contrib/scripts/autosupport $(DESTDIR)$(ASTSBINDIR)/	
+	$(INSTALL) -m 755 contrib/scripts/autosupport $(DESTDIR)$(ASTSBINDIR)/
 	if [ ! -f $(DESTDIR)$(ASTSBINDIR)/safe_asterisk ]; then \
 		cat contrib/scripts/safe_asterisk | sed 's|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;' > $(DESTDIR)$(ASTSBINDIR)/safe_asterisk ;\
 		chmod 755 $(DESTDIR)$(ASTSBINDIR)/safe_asterisk;\
@@ -708,7 +665,7 @@
 	if [ -f mpg123-0.59r/mpg123 ]; then $(MAKE) -C mpg123-0.59r install; fi
 
 install-subdirs:
-	for x in $(SUBDIRS); do $(MAKE) -C $$x install || exit 1 ; done
+	@for x in $(SUBDIRS); do $(MAKE) -C $$x install || exit 1 ; done
 
 NEWMODS=$(notdir $(wildcard */*.so))
 OLDMODS=$(filter-out $(NEWMODS),$(notdir $(wildcard $(DESTDIR)$(MODULES_DIR)/*.so)))
@@ -864,7 +821,7 @@
 
 rpm: __rpm
 
-__rpm: include/asterisk/version.h spec
+__rpm: include/asterisk/version.h include/asterisk/buildopts.h spec
 	rm -rf /tmp/asterisk ; \
 	mkdir -p /tmp/asterisk/redhat/RPMS/i386 ; \
 	$(MAKE) DESTDIR=/tmp/asterisk install ; \
@@ -913,10 +870,10 @@
 
 valgrind: dont-optimize
 
-depend: include/asterisk/version.h .depend defaults.h 
-	for x in $(SUBDIRS); do $(MAKE) -C $$x depend || exit 1 ; done
-
-.depend: include/asterisk/version.h defaults.h
+depend: include/asterisk/version.h include/asterisk/buildopts.h .depend defaults.h 
+	@for x in $(SUBDIRS); do $(MAKE) -C $$x depend || exit 1 ; done
+
+.depend: include/asterisk/version.h include/asterisk/buildopts.h defaults.h
 	build_tools/mkdep $(CFLAGS) $(wildcard *.c)
 
 .tags-depend:
@@ -959,7 +916,7 @@
 # last clean count we had
 
 cleantest:
-	if cmp -s .cleancount .lastclean ; then echo ; else \
+	@if cmp -s .cleancount .lastclean ; then echo ; else \
 		$(MAKE) clean; cp -f .cleancount .lastclean;\
 	fi
 
@@ -999,7 +956,7 @@
 menuselect: build_tools/menuselect makeopts.xml
 	- at build_tools/menuselect ${GLOBAL_MAKEOPTS} ${USER_MAKEOPTS} menuselect.makeopts && echo "menuselect changes saved!" || echo "menuselect changes NOT saved!"
 
-build_tools/menuselect: build_tools/menuselect.c build_tools/menuselect_curses.c build_tools/menuselect.h include/autoconfig.h strcompat.o mxml/libmxml.a
+build_tools/menuselect: build_tools/menuselect.c build_tools/menuselect_curses.c build_tools/menuselect.h config.status mxml/libmxml.a $(MENUSELECT_OBJS)
 	$(MAKE) -C build_tools menuselect
 
 mxml/libmxml.a:

Modified: team/oej/siptransfer/app.c
URL: http://svn.digium.com/view/asterisk/team/oej/siptransfer/app.c?rev=27720&r1=27719&r2=27720&view=diff
==============================================================================
--- team/oej/siptransfer/app.c (original)
+++ team/oej/siptransfer/app.c Wed May 17 02:27:16 2006
@@ -144,86 +144,6 @@
 	return res;
 }
 
-int ast_app_getvoice(struct ast_channel *c, char *dest, char *dstfmt, char *prompt, int silence, int maxsec)
-{
-	int res;
-	struct ast_filestream *writer;
-	int rfmt;
-	int totalms=0, total;
-	
-	struct ast_frame *f;
-	struct ast_dsp *sildet;
-	/* Play prompt if requested */
-	if (prompt) {
-		res = ast_stream_and_wait(c, prompt, c->language, "");
-		if (res < 0)
-			return res;
-	}
-	rfmt = c->readformat;
-	res = ast_set_read_format(c, AST_FORMAT_SLINEAR);
-	if (res < 0) {
-		ast_log(LOG_WARNING, "Unable to set to linear mode, giving up\n");
-		return -1;
-	}
-	sildet = ast_dsp_new();
-	if (!sildet) {
-		ast_log(LOG_WARNING, "Unable to create silence detector :(\n");
-		return -1;
-	}
-	writer = ast_writefile(dest, dstfmt, "Voice file", 0, 0, 0666);
-	if (!writer) {
-		ast_log(LOG_WARNING, "Unable to open file '%s' in format '%s' for writing\n", dest, dstfmt);
-		ast_dsp_free(sildet);
-		return -1;
-	}
-	for(;;) {
-		if ((res = ast_waitfor(c, 2000)) < 0) {
-			ast_log(LOG_NOTICE, "Waitfor failed while recording file '%s' format '%s'\n", dest, dstfmt);
-			break;
-		}
-		if (res) {
-			f = ast_read(c);
-			if (!f) {
-				ast_log(LOG_NOTICE, "Hungup while recording file '%s' format '%s'\n", dest, dstfmt);
-				break;
-			}
-			if ((f->frametype == AST_FRAME_DTMF) && (f->subclass == '#')) {
-				/* Ended happily with DTMF */
-				ast_frfree(f);
-				break;
-			} else if (f->frametype == AST_FRAME_VOICE) {
-				ast_dsp_silence(sildet, f, &total); 
-				if (total > silence) {
-					/* Ended happily with silence */
-					ast_frfree(f);
-					break;
-				}
-				totalms += f->samples / 8;
-				if (totalms > maxsec * 1000) {
-					/* Ended happily with too much stuff */
-					ast_log(LOG_NOTICE, "Constraining voice on '%s' to %d seconds\n", c->name, maxsec);
-					ast_frfree(f);
-					break;
-				}
-				res = ast_writestream(writer, f);
-				if (res < 0) {
-					ast_log(LOG_WARNING, "Failed to write to stream at %s!\n", dest);
-					ast_frfree(f);
-					break;
-				}
-					
-			}
-			ast_frfree(f);
-		}
-	}
-	res = ast_set_read_format(c, rfmt);
-	if (res)
-		ast_log(LOG_WARNING, "Unable to restore read format on '%s'\n", c->name);
-	ast_dsp_free(sildet);
-	ast_closestream(writer);
-	return 0;
-}
-
 static int (*ast_has_voicemail_func)(const char *mailbox, const char *folder) = NULL;
 static int (*ast_messagecount_func)(const char *mailbox, int *newmsgs, int *oldmsgs) = NULL;
 
@@ -603,7 +523,7 @@
 	ast_log(LOG_DEBUG,"Recording Formats: sfmts=%s\n", fmts);
 	sfmt[0] = ast_strdupa(fmts);
 
-	while((fmt = strsep(&stringp, "|"))) {
+	while ((fmt = strsep(&stringp, "|"))) {
 		if (fmtcnt > MAX_OTHER_FORMATS - 1) {
 			ast_log(LOG_WARNING, "Please increase MAX_OTHER_FORMATS in app.c\n");
 			break;
@@ -1172,13 +1092,12 @@
 	case AST_ACTION_BACKLIST:
 		res = 0;
 		c = ast_strdupa(option->adata);
-		if (c) {
-			while((n = strsep(&c, ";")))
-				if ((res = ast_stream_and_wait(chan, n, chan->language,
-						(option->action == AST_ACTION_BACKLIST) ? AST_DIGIT_ANY : "")))
-					break;
-			ast_stopstream(chan);
-		}
+		while ((n = strsep(&c, ";"))) {
+			if ((res = ast_stream_and_wait(chan, n, chan->language,
+					(option->action == AST_ACTION_BACKLIST) ? AST_DIGIT_ANY : "")))
+				break;
+		}
+		ast_stopstream(chan);
 		return res;
 	default:
 		ast_log(LOG_NOTICE, "Unknown dispatch function %d, ignoring!\n", option->action);

Modified: team/oej/siptransfer/apps/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/siptransfer/apps/Makefile?rev=27720&r1=27719&r2=27720&view=diff
==============================================================================
--- team/oej/siptransfer/apps/Makefile (original)
+++ team/oej/siptransfer/apps/Makefile Wed May 17 02:27:16 2006
@@ -12,10 +12,6 @@
 #
 
 MODS:=$(filter-out $(MENUSELECT_APPS),$(patsubst %.c,%.so,$(wildcard app_*.c)))
-
-ifneq ($(WITH_SMDI),)
-  CFLAGS+=-DWITH_SMDI
-endif
 
 # If you have UnixODBC you can use ODBC voicemail
 # storage

Modified: team/oej/siptransfer/apps/app_amd.c
URL: http://svn.digium.com/view/asterisk/team/oej/siptransfer/apps/app_amd.c?rev=27720&r1=27719&r2=27720&view=diff
==============================================================================
--- team/oej/siptransfer/apps/app_amd.c (original)
+++ team/oej/siptransfer/apps/app_amd.c Wed May 17 02:27:16 2006
@@ -140,12 +140,7 @@
 		ast_log(LOG_NOTICE, "AMD using the default parameters.\n");
 	} else {
 		/* Some arguments have been passed. Lets parse them and overwrite the defaults. */
-		if (!(parse = ast_strdupa(data))) {
-			ast_log(LOG_WARNING, "Memory allocation failure\n");
-			pbx_builtin_setvar_helper(chan , "AMDSTATUS" , "" );
-			pbx_builtin_setvar_helper(chan , "AMDCAUSE" , "" );
-			return;
-		}
+		parse = ast_strdupa(data);
 
 		AST_STANDARD_APP_ARGS(args, parse);
 

Modified: team/oej/siptransfer/apps/app_authenticate.c
URL: http://svn.digium.com/view/asterisk/team/oej/siptransfer/apps/app_authenticate.c?rev=27720&r1=27719&r2=27720&view=diff
==============================================================================
--- team/oej/siptransfer/apps/app_authenticate.c (original)
+++ team/oej/siptransfer/apps/app_authenticate.c Wed May 17 02:27:16 2006
@@ -123,10 +123,7 @@
 		}
 	}
 	
-	if (!(argcopy = ast_strdupa(data))) {
-		LOCAL_USER_REMOVE(u);
-		return -1;
-	}
+	argcopy = ast_strdupa(data);
 
 	AST_STANDARD_APP_ARGS(arglist,argcopy);
 	

Modified: team/oej/siptransfer/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/team/oej/siptransfer/apps/app_chanspy.c?rev=27720&r1=27719&r2=27720&view=diff
==============================================================================
--- team/oej/siptransfer/apps/app_chanspy.c (original)
+++ team/oej/siptransfer/apps/app_chanspy.c Wed May 17 02:27:16 2006
@@ -56,7 +56,7 @@
 #define ALL_DONE(u, ret) LOCAL_USER_REMOVE(u); return ret;
 #define get_volfactor(x) x ? ((x > 0) ? (1 << x) : ((1 << abs(x)) * -1)) : 0
 
-static const char *synopsis = "Listen to the audio of an active channel";
+static const char *tdesc = "Listen to the audio of an active channel";
 static const char *app = "ChanSpy";
 static const char *desc = 
 "  ChanSpy([chanprefix][|options]): This application is used to listen to the\n"
@@ -198,9 +198,9 @@
 
 	ast_log(LOG_NOTICE, "Attaching %s to %s\n", spychan->name, chan->name);
 
-	ast_mutex_lock(&chan->lock);
+	ast_channel_lock(chan);
 	res = ast_channel_spy_add(chan, spy);
-	ast_mutex_unlock(&chan->lock);
+	ast_channel_unlock(chan);
 
 	if (!res && ast_test_flag(chan, AST_FLAG_NBRIDGE) && (peer = ast_bridged_channel(chan))) {
 		ast_softhangup(peer, AST_SOFTHANGUP_UNBRIDGE);	
@@ -219,9 +219,9 @@
 	if (!chan)
 		return;
 
-	ast_mutex_lock(&chan->lock);
+	ast_channel_lock(chan);
 	ast_channel_spy_remove(chan, spy);
-	ast_mutex_unlock(&chan->lock);
+	ast_channel_unlock(chan);
 };
 
 /* Map 'volume' levels from -4 through +4 into
@@ -584,12 +584,12 @@
 static int load_module(void *mod)
 {
 	__mod_desc = mod;
-	return ast_register_application(app, chanspy_exec, synopsis, desc);
+	return ast_register_application(app, chanspy_exec, tdesc, desc);
 }
 
 static const char *description(void)
 {
-	return (char *) synopsis;
+	return (char *) tdesc;
 }
 
 static const char *key(void)

Modified: team/oej/siptransfer/apps/app_db.c
URL: http://svn.digium.com/view/asterisk/team/oej/siptransfer/apps/app_db.c?rev=27720&r1=27719&r2=27720&view=diff
==============================================================================
--- team/oej/siptransfer/apps/app_db.c (original)
+++ team/oej/siptransfer/apps/app_db.c Wed May 17 02:27:16 2006
@@ -71,10 +71,7 @@
 
 	LOCAL_USER_ADD(u);
 
-	if (!(argv = ast_strdupa(data))) {
-		LOCAL_USER_REMOVE(u);
-		return 0;
-	}
+	argv = ast_strdupa(data);
 
 	if (strchr(argv, '/')) {
 		family = strsep(&argv, "/");
@@ -115,10 +112,7 @@
 
 	LOCAL_USER_ADD(u);
 
-	if (!(argv = ast_strdupa(data))) {
-		LOCAL_USER_REMOVE(u);
-		return 0;
-	}
+	argv = ast_strdupa(data);
 
 	if (strchr(argv, '/')) {
 		family = strsep(&argv, "/");

Modified: team/oej/siptransfer/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/oej/siptransfer/apps/app_dial.c?rev=27720&r1=27719&r2=27720&view=diff
==============================================================================
--- team/oej/siptransfer/apps/app_dial.c (original)
+++ team/oej/siptransfer/apps/app_dial.c Wed May 17 02:27:16 2006
@@ -482,7 +482,7 @@
 					ast_clear_flag(o, DIAL_STILLGOING);	
 					HANDLE_CAUSE(cause, in);
 				} else {
-					ast_rtp_make_compatible(c, in);
+					ast_rtp_make_compatible(c, in, single);
 					if (c->cid.cid_num)
 						free(c->cid.cid_num);
 					c->cid.cid_num = NULL;
@@ -550,6 +550,8 @@
 							       OPT_CALLEE_HANGUP | OPT_CALLER_HANGUP |
 							       OPT_CALLEE_MONITOR | OPT_CALLER_MONITOR |
 							       DIAL_NOFORWARDHTML);
+						/* Setup early media if appropriate */
+						ast_rtp_early_media(in, peer);
 					}
 					/* If call has been answered, then the eventual hangup is likely to be normal hangup */
 					in->hangupcause = AST_CAUSE_NORMAL_CLEARING;
@@ -576,6 +578,9 @@
 				case AST_CONTROL_RINGING:
 					if (option_verbose > 2)
 						ast_verbose(VERBOSE_PREFIX_3 "%s is ringing\n", c->name);
+					/* Setup early media if appropriate */
+					if (single)
+						ast_rtp_early_media(in, c);
 					if (!(*sentringing) && !ast_test_flag(outgoing, OPT_MUSICBACK)) {
 						ast_indicate(in, AST_CONTROL_RINGING);
 						(*sentringing)++;
@@ -584,6 +589,9 @@
 				case AST_CONTROL_PROGRESS:
 					if (option_verbose > 2)
 						ast_verbose (VERBOSE_PREFIX_3 "%s is making progress passing it to %s\n", c->name, in->name);
+					/* Setup early media if appropriate */
+					if (single)
+						ast_rtp_early_media(in, c);
 					if (!ast_test_flag(outgoing, OPT_RINGBACK))
 						ast_indicate(in, AST_CONTROL_PROGRESS);
 					break;
@@ -595,6 +603,8 @@
 				case AST_CONTROL_PROCEEDING:
 					if (option_verbose > 2)
 						ast_verbose (VERBOSE_PREFIX_3 "%s is proceeding passing it to %s\n", c->name, in->name);
+					if (single)
+						ast_rtp_early_media(in, c);
 					if (!ast_test_flag(outgoing, OPT_RINGBACK))
 						ast_indicate(in, AST_CONTROL_PROCEEDING);
 					break;
@@ -777,8 +787,7 @@
 
 	LOCAL_USER_ADD(u);
 
-	if (!(parse = ast_strdupa(data)))
-		goto done;
+	parse = ast_strdupa(data);
 
 	AST_STANDARD_APP_ARGS(args, parse);
 
@@ -1056,7 +1065,7 @@
 		}
 
 		/* Setup outgoing SDP to match incoming one */
-		ast_rtp_make_compatible(tmp->chan, chan);
+		ast_rtp_make_compatible(tmp->chan, chan, !outgoing && !rest);
 		
 		/* Inherit specially named variables from parent channel */
 		ast_channel_inherit_variables(chan, tmp->chan);
@@ -1550,6 +1559,7 @@
 		sentringing = 0;
 		ast_indicate(chan, -1);
 	}
+	ast_rtp_early_media(chan, NULL);
 	hanguptree(outgoing, NULL);
 	pbx_builtin_setvar_helper(chan, "DIALSTATUS", status);
 	if (option_debug)
@@ -1585,8 +1595,7 @@
 
 	LOCAL_USER_ADD(u);
 
-	if (!(announce = ast_strdupa(data)))
-		goto done;
+	announce = ast_strdupa(data);
 
 	memset(&peerflags, 0, sizeof(peerflags));
 

Modified: team/oej/siptransfer/apps/app_dictate.c
URL: http://svn.digium.com/view/asterisk/team/oej/siptransfer/apps/app_dictate.c?rev=27720&r1=27719&r2=27720&view=diff
==============================================================================
--- team/oej/siptransfer/apps/app_dictate.c (original)
+++ team/oej/siptransfer/apps/app_dictate.c Wed May 17 02:27:16 2006
@@ -107,8 +107,7 @@
 	
 	snprintf(dftbase, sizeof(dftbase), "%s/dictate", ast_config_AST_SPOOL_DIR);
 	if (!ast_strlen_zero(data)) {
-		if (!(parse = ast_strdupa(data)))
-			return -1;
+		parse = ast_strdupa(data);
 		AST_STANDARD_APP_ARGS(args, parse);
 	} else
 		args.argc = 0;

Modified: team/oej/siptransfer/apps/app_directory.c
URL: http://svn.digium.com/view/asterisk/team/oej/siptransfer/apps/app_directory.c?rev=27720&r1=27719&r2=27720&view=diff
==============================================================================
--- team/oej/siptransfer/apps/app_directory.c (original)
+++ team/oej/siptransfer/apps/app_directory.c Wed May 17 02:27:16 2006
@@ -411,10 +411,7 @@
 
 	LOCAL_USER_ADD(u);
 
-	if (!(parse = ast_strdupa(data))) {
-		LOCAL_USER_REMOVE(u);
-		return -1; 
-	}
+	parse = ast_strdupa(data);
 
 	AST_STANDARD_APP_ARGS(args, parse);
 		

Modified: team/oej/siptransfer/apps/app_disa.c
URL: http://svn.digium.com/view/asterisk/team/oej/siptransfer/apps/app_disa.c?rev=27720&r1=27719&r2=27720&view=diff
==============================================================================
--- team/oej/siptransfer/apps/app_disa.c (original)
+++ team/oej/siptransfer/apps/app_disa.c Wed May 17 02:27:16 2006
@@ -158,10 +158,7 @@
 	ast_log(LOG_DEBUG, "Digittimeout: %d\n", digittimeout);
 	ast_log(LOG_DEBUG, "Responsetimeout: %d\n", firstdigittimeout);
 
-	if (!(tmp = ast_strdupa(data))) {
-		LOCAL_USER_REMOVE(u);
-		return -1;
-	}	
+	tmp = ast_strdupa(data);
 
 	AST_STANDARD_APP_ARGS(args, tmp);
 

Modified: team/oej/siptransfer/apps/app_exec.c
URL: http://svn.digium.com/view/asterisk/team/oej/siptransfer/apps/app_exec.c?rev=27720&r1=27719&r2=27720&view=diff
==============================================================================
--- team/oej/siptransfer/apps/app_exec.c (original)
+++ team/oej/siptransfer/apps/app_exec.c Wed May 17 02:27:16 2006
@@ -80,8 +80,7 @@
 "The channel variable TRYSTATUS will be set to:\n"
 "    SUCCESS   if the application returned zero\n"
 "    FAILED    if the application returned non-zero\n"
-"    NOAPP     if the application was not found or was not specified\n"
-"    NOMEMORY  if there was not enough memory to execute.\n";
+"    NOAPP     if the application was not found or was not specified\n";
 
 static char *app_execif = "ExecIf";
 static char *execif_synopsis = "Executes dialplan application, conditionally";
@@ -104,25 +103,23 @@
 
 	/* Check and parse arguments */
 	if (data) {
-		if ((s = ast_strdupa(data))) {
-			appname = strsep(&s, "(");
-			if (s) {
-				endargs = strrchr(s, ')');
-				if (endargs)
-					*endargs = '\0';
-				pbx_substitute_variables_helper(chan, s, args, MAXRESULT - 1);
+		s = ast_strdupa(data);
+		appname = strsep(&s, "(");
+		if (s) {
+			endargs = strrchr(s, ')');
+			if (endargs)
+				*endargs = '\0';
+			pbx_substitute_variables_helper(chan, s, args, MAXRESULT - 1);
+		}
+		if (appname) {
+			app = pbx_findapp(appname);
+			if (app) {
+				res = pbx_exec(chan, app, args);
+			} else {
+				ast_log(LOG_WARNING, "Could not find application (%s)\n", appname);
+				res = -1;
 			}
-			if (appname) {
-				app = pbx_findapp(appname);
-				if (app) {
-					res = pbx_exec(chan, app, args);
-				} else {
-					ast_log(LOG_WARNING, "Could not find application (%s)\n", appname);
-					res = -1;
-				}
-			}
-		} else
-			res = -1;
+		}
 	}
 
 	LOCAL_USER_REMOVE(u);
@@ -140,27 +137,23 @@
 
 	/* Check and parse arguments */
 	if (data) {
-		if ((s = ast_strdupa(data))) {
-			appname = strsep(&s, "(");
-			if (s) {
-				endargs = strrchr(s, ')');
-				if (endargs)
-					*endargs = '\0';
-				pbx_substitute_variables_helper(chan, s, args, MAXRESULT - 1);
+		s = ast_strdupa(data);
+		appname = strsep(&s, "(");
+		if (s) {
+			endargs = strrchr(s, ')');
+			if (endargs)
+				*endargs = '\0';
+			pbx_substitute_variables_helper(chan, s, args, MAXRESULT - 1);
+		}
+		if (appname) {
+			app = pbx_findapp(appname);
+			if (app) {
+				res = pbx_exec(chan, app, args);
+				pbx_builtin_setvar_helper(chan, "TRYSTATUS", res ? "FAILED" : "SUCCESS");
+			} else {
+				ast_log(LOG_WARNING, "Could not find application (%s)\n", appname);
+				pbx_builtin_setvar_helper(chan, "TRYSTATUS", "NOAPP");
 			}
-			if (appname) {
-				app = pbx_findapp(appname);
-				if (app) {
-					res = pbx_exec(chan, app, args);
-					pbx_builtin_setvar_helper(chan, "TRYSTATUS", res ? "FAILED" : "SUCCESS");
-				} else {
-					ast_log(LOG_WARNING, "Could not find application (%s)\n", appname);
-					pbx_builtin_setvar_helper(chan, "TRYSTATUS", "NOAPP");
-				}
-			}
-		} else {
-			ast_log(LOG_ERROR, "Out of memory\n");
-			pbx_builtin_setvar_helper(chan, "TRYSTATUS", "NOMEMORY");
 		}
 	}
 
@@ -178,10 +171,7 @@
 
 	LOCAL_USER_ADD(u);
 
-	if (!(expr = ast_strdupa(data))) {
-		LOCAL_USER_REMOVE(u);
-		return -1;
-	}
+	expr = ast_strdupa(data);
 
 	if ((myapp = strchr(expr,'|'))) {
 		*myapp = '\0';

Modified: team/oej/siptransfer/apps/app_externalivr.c
URL: http://svn.digium.com/view/asterisk/team/oej/siptransfer/apps/app_externalivr.c?rev=27720&r1=27719&r2=27720&view=diff
==============================================================================
--- team/oej/siptransfer/apps/app_externalivr.c (original)
+++ team/oej/siptransfer/apps/app_externalivr.c Wed May 17 02:27:16 2006
@@ -258,14 +258,14 @@
 	FILE *child_commands = NULL;
 	FILE *child_errors = NULL;
 	FILE *child_events = NULL;
-	struct ivr_localuser foo, *u = &foo;
-
-	bzero(u, sizeof(*u));
+	struct ivr_localuser foo = {
+		.playlist = AST_LIST_HEAD_INIT_VALUE,
+		.finishlist = AST_LIST_HEAD_INIT_VALUE,
+	};
+	struct ivr_localuser *u = &foo;
 
 	LOCAL_USER_ADD(lu);
 	
-	AST_LIST_HEAD_INIT(&u->playlist);
-	AST_LIST_HEAD_INIT(&u->finishlist);
 	u->abort_current_sound = 0;
 	u->chan = chan;
 	
@@ -275,10 +275,7 @@
 		return -1;	
 	}
 
-	if (!(buf = ast_strdupa(data))) {
-		LOCAL_USER_REMOVE(lu);
-		return -1;
-	}
+	buf = ast_strdupa(data);
 
 	argc = ast_app_separate_args(buf, '|', argv, sizeof(argv) / sizeof(argv[0]));
 

Modified: team/oej/siptransfer/apps/app_festival.c
URL: http://svn.digium.com/view/asterisk/team/oej/siptransfer/apps/app_festival.c?rev=27720&r1=27719&r2=27720&view=diff
==============================================================================
--- team/oej/siptransfer/apps/app_festival.c (original)
+++ team/oej/siptransfer/apps/app_festival.c Wed May 17 02:27:16 2006
@@ -305,6 +305,7 @@
 	char *data;	
 	char *intstr;
 	struct ast_config *cfg;
+	char *newfestivalcommand;
 
 	if (ast_strlen_zero(vdata)) {
 		ast_log(LOG_WARNING, "festival requires an argument (text)\n");
@@ -337,13 +338,25 @@
 	}
 	if (!(festivalcommand = ast_variable_retrieve(cfg, "general", "festivalcommand"))) {
 		festivalcommand = "(tts_textasterisk \"%s\" 'file)(quit)\n";
-	}
-	
-	if (!(data = ast_strdupa(vdata))) {
-		ast_config_destroy(cfg);
-		LOCAL_USER_REMOVE(u);
-		return -1;
-	}
+	} else { /* This else parses the festivalcommand that we're sent from the config file for \n's, etc */
+		int i, j;
+		newfestivalcommand = alloca(strlen(festivalcommand) + 1);
+
+		for (i = 0, j = 0; i < strlen(festivalcommand); i++) {
+			if (festivalcommand[i] == '\\' && festivalcommand[i + 1] == 'n') {
+				newfestivalcommand[j++] = '\n';
+				i++;
+			} else if (festivalcommand[i] == '\\') {
+				newfestivalcommand[j++] = festivalcommand[i + 1];
+				i++;
+			} else
+				newfestivalcommand[j++] = festivalcommand[i];
+		}
+		newfestivalcommand[j] = '\0';
+		festivalcommand = newfestivalcommand;
+	}
+	
+	data = ast_strdupa(vdata);
 
 	intstr = strchr(data, '|');
 	if (intstr) {	

Modified: team/oej/siptransfer/apps/app_hasnewvoicemail.c
URL: http://svn.digium.com/view/asterisk/team/oej/siptransfer/apps/app_hasnewvoicemail.c?rev=27720&r1=27719&r2=27720&view=diff
==============================================================================
--- team/oej/siptransfer/apps/app_hasnewvoicemail.c (original)
+++ team/oej/siptransfer/apps/app_hasnewvoicemail.c Wed May 17 02:27:16 2006
@@ -126,10 +126,7 @@
 
 	LOCAL_USER_ADD(u);
 
-	if (!(input = ast_strdupa(data))) {
-		LOCAL_USER_REMOVE(u);
-		return -1;
-	}
+	input = ast_strdupa(data);
 
 	AST_STANDARD_APP_ARGS(args, input);
 

Modified: team/oej/siptransfer/apps/app_image.c
URL: http://svn.digium.com/view/asterisk/team/oej/siptransfer/apps/app_image.c?rev=27720&r1=27719&r2=27720&view=diff
==============================================================================
--- team/oej/siptransfer/apps/app_image.c (original)
+++ team/oej/siptransfer/apps/app_image.c Wed May 17 02:27:16 2006
@@ -76,10 +76,7 @@
 	
 	LOCAL_USER_ADD(u);
 
-	if (!(parse = ast_strdupa(data))) {
-		LOCAL_USER_REMOVE(u);
-		return -1;
-	}
+	parse = ast_strdupa(data);
 
 	AST_STANDARD_APP_ARGS(args, parse);
 

Modified: team/oej/siptransfer/apps/app_meetme.c

[... 11763 lines stripped ...]


More information about the asterisk-commits mailing list