[svn-commits] oej: branch oej/callpickup r39150 - in
/team/oej/callpickup: ./ agi/ apps/ bu...
svn-commits at lists.digium.com
svn-commits at lists.digium.com
Mon Aug 7 05:35:43 MST 2006
Author: oej
Date: Mon Aug 7 07:35:41 2006
New Revision: 39150
URL: http://svn.digium.com/view/asterisk?rev=39150&view=rev
Log:
Reset automerge
Added:
team/oej/callpickup/Makefile.moddir_rules
- copied unchanged from r39132, trunk/Makefile.moddir_rules
team/oej/callpickup/channels/chan_vpb.cc
- copied unchanged from r39132, trunk/channels/chan_vpb.cc
team/oej/callpickup/doc/osp.txt
- copied unchanged from r39132, trunk/doc/osp.txt
team/oej/callpickup/pbx/ael/ael-test/ael-ntest12/
- copied from r39132, trunk/pbx/ael/ael-test/ael-ntest12/
team/oej/callpickup/pbx/ael/ael-test/ael-ntest12/extensions.ael
- copied unchanged from r39132, trunk/pbx/ael/ael-test/ael-ntest12/extensions.ael
team/oej/callpickup/pbx/ael/ael-test/ael-ntest9/
- copied from r39132, trunk/pbx/ael/ael-test/ael-ntest9/
team/oej/callpickup/pbx/ael/ael-test/ael-ntest9/extensions.ael
- copied unchanged from r39132, trunk/pbx/ael/ael-test/ael-ntest9/extensions.ael
team/oej/callpickup/pbx/ael/ael-test/ref.ael-ntest12
- copied unchanged from r39132, trunk/pbx/ael/ael-test/ref.ael-ntest12
team/oej/callpickup/pbx/ael/ael-test/ref.ael-ntest9
- copied unchanged from r39132, trunk/pbx/ael/ael-test/ref.ael-ntest9
team/oej/callpickup/pbx/kdeconsole_main.cc
- copied unchanged from r39132, trunk/pbx/kdeconsole_main.cc
Removed:
team/oej/callpickup/channels/chan_vpb.c
team/oej/callpickup/codecs/codec_g723_1.c
team/oej/callpickup/codecs/g723_slin_ex.h
team/oej/callpickup/codecs/slin_g723_ex.h
team/oej/callpickup/pbx/pbx_kdeconsole_main.cc
team/oej/callpickup/res/res_osp.c
Modified:
team/oej/callpickup/ (props changed)
team/oej/callpickup/.cleancount
team/oej/callpickup/Makefile
team/oej/callpickup/Makefile.rules
team/oej/callpickup/UPGRADE.txt
team/oej/callpickup/acinclude.m4
team/oej/callpickup/acl.c
team/oej/callpickup/agi/Makefile
team/oej/callpickup/app.c
team/oej/callpickup/apps/Makefile
team/oej/callpickup/apps/app_chanspy.c
team/oej/callpickup/apps/app_dial.c
team/oej/callpickup/apps/app_directed_pickup.c
team/oej/callpickup/apps/app_directory.c
team/oej/callpickup/apps/app_disa.c
team/oej/callpickup/apps/app_dumpchan.c
team/oej/callpickup/apps/app_flash.c
team/oej/callpickup/apps/app_followme.c
team/oej/callpickup/apps/app_meetme.c
team/oej/callpickup/apps/app_osplookup.c
team/oej/callpickup/apps/app_queue.c
team/oej/callpickup/apps/app_rpt.c
team/oej/callpickup/apps/app_sms.c
team/oej/callpickup/apps/app_speech_utils.c
team/oej/callpickup/apps/app_voicemail.c
team/oej/callpickup/apps/app_zapbarge.c
team/oej/callpickup/apps/app_zapras.c
team/oej/callpickup/apps/app_zapscan.c
team/oej/callpickup/ast_expr2f.c
team/oej/callpickup/asterisk.c
team/oej/callpickup/autoservice.c
team/oej/callpickup/build_tools/menuselect-deps.in
team/oej/callpickup/build_tools/prep_moduledeps
team/oej/callpickup/cdr/Makefile
team/oej/callpickup/cdr/cdr_radius.c
team/oej/callpickup/channel.c
team/oej/callpickup/channels/ (props changed)
team/oej/callpickup/channels/Makefile
team/oej/callpickup/channels/chan_agent.c
team/oej/callpickup/channels/chan_alsa.c
team/oej/callpickup/channels/chan_h323.c
team/oej/callpickup/channels/chan_iax2.c
team/oej/callpickup/channels/chan_jingle.c
team/oej/callpickup/channels/chan_mgcp.c
team/oej/callpickup/channels/chan_misdn.c
team/oej/callpickup/channels/chan_nbs.c
team/oej/callpickup/channels/chan_oss.c
team/oej/callpickup/channels/chan_phone.c
team/oej/callpickup/channels/chan_sip.c
team/oej/callpickup/channels/chan_skinny.c
team/oej/callpickup/channels/chan_zap.c
team/oej/callpickup/channels/iax2-parser.c
team/oej/callpickup/channels/iax2-provision.c
team/oej/callpickup/channels/misdn/Makefile
team/oej/callpickup/channels/misdn/chan_misdn_config.h
team/oej/callpickup/channels/misdn/ie.c
team/oej/callpickup/channels/misdn/isdn_lib.c
team/oej/callpickup/channels/misdn/isdn_lib.h
team/oej/callpickup/channels/misdn/isdn_lib_intern.h
team/oej/callpickup/channels/misdn/isdn_msg_parser.c
team/oej/callpickup/channels/misdn_config.c
team/oej/callpickup/cli.c
team/oej/callpickup/codecs/Makefile
team/oej/callpickup/codecs/codec_g726.c
team/oej/callpickup/codecs/codec_gsm.c
team/oej/callpickup/codecs/codec_ilbc.c
team/oej/callpickup/codecs/codec_lpc10.c
team/oej/callpickup/codecs/codec_speex.c
team/oej/callpickup/codecs/codec_zap.c
team/oej/callpickup/codecs/gsm/Makefile
team/oej/callpickup/codecs/gsm/src/preprocess.c
team/oej/callpickup/codecs/ilbc/Makefile
team/oej/callpickup/codecs/lpc10/Makefile
team/oej/callpickup/config.c
team/oej/callpickup/configs/alsa.conf.sample
team/oej/callpickup/configs/extconfig.conf.sample
team/oej/callpickup/configs/extensions.conf.sample
team/oej/callpickup/configs/features.conf.sample
team/oej/callpickup/configs/func_odbc.conf.sample
team/oej/callpickup/configs/iax.conf.sample
team/oej/callpickup/configs/manager.conf.sample
team/oej/callpickup/configs/misdn.conf.sample
team/oej/callpickup/configs/modules.conf.sample
team/oej/callpickup/configs/queues.conf.sample
team/oej/callpickup/configs/sip.conf.sample
team/oej/callpickup/configs/skinny.conf.sample
team/oej/callpickup/configs/zapata.conf.sample
team/oej/callpickup/configure
team/oej/callpickup/configure.ac
team/oej/callpickup/contrib/init.d/rc.mandrake.zaptel
team/oej/callpickup/db1-ast/Makefile
team/oej/callpickup/devicestate.c
team/oej/callpickup/dns.c
team/oej/callpickup/dnsmgr.c
team/oej/callpickup/doc/CODING-GUIDELINES
team/oej/callpickup/doc/asterisk-conf.txt
team/oej/callpickup/doc/enum.txt
team/oej/callpickup/doc/extconfig.txt
team/oej/callpickup/doc/misdn.txt
team/oej/callpickup/doc/realtime.txt
team/oej/callpickup/doc/speechrec.txt
team/oej/callpickup/dsp.c
team/oej/callpickup/enum.c
team/oej/callpickup/formats/Makefile
team/oej/callpickup/formats/format_h263.c
team/oej/callpickup/formats/format_ogg_vorbis.c
team/oej/callpickup/formats/format_wav_gsm.c
team/oej/callpickup/frame.c
team/oej/callpickup/funcs/Makefile
team/oej/callpickup/funcs/func_db.c
team/oej/callpickup/funcs/func_strings.c
team/oej/callpickup/http.c
team/oej/callpickup/include/asterisk/abstract_jb.h
team/oej/callpickup/include/asterisk/app.h
team/oej/callpickup/include/asterisk/astosp.h
team/oej/callpickup/include/asterisk/autoconfig.h.in
team/oej/callpickup/include/asterisk/channel.h
team/oej/callpickup/include/asterisk/compiler.h
team/oej/callpickup/include/asterisk/config.h
team/oej/callpickup/include/asterisk/devicestate.h
team/oej/callpickup/include/asterisk/dns.h
team/oej/callpickup/include/asterisk/frame.h
team/oej/callpickup/include/asterisk/lock.h
team/oej/callpickup/include/asterisk/manager.h
team/oej/callpickup/include/asterisk/musiconhold.h
team/oej/callpickup/include/asterisk/options.h
team/oej/callpickup/include/asterisk/pbx.h
team/oej/callpickup/include/asterisk/rtp.h
team/oej/callpickup/include/asterisk/slinfactory.h
team/oej/callpickup/include/asterisk/speech.h
team/oej/callpickup/include/asterisk/utils.h
team/oej/callpickup/logger.c
team/oej/callpickup/makeopts.in
team/oej/callpickup/manager.c
team/oej/callpickup/netsock.c
team/oej/callpickup/pbx.c
team/oej/callpickup/pbx/Makefile
team/oej/callpickup/pbx/ael/ael-test/runtests
team/oej/callpickup/pbx/ael/ael.flex
team/oej/callpickup/pbx/ael/ael.tab.c
team/oej/callpickup/pbx/ael/ael.tab.h
team/oej/callpickup/pbx/ael/ael.y
team/oej/callpickup/pbx/ael/ael_lex.c
team/oej/callpickup/pbx/dundi-parser.c
team/oej/callpickup/pbx/pbx_ael.c
team/oej/callpickup/pbx/pbx_config.c
team/oej/callpickup/pbx/pbx_dundi.c
team/oej/callpickup/pbx/pbx_gtkconsole.c
team/oej/callpickup/pbx/pbx_kdeconsole.cc
team/oej/callpickup/plc.c
team/oej/callpickup/res/Makefile
team/oej/callpickup/res/res_adsi.c
team/oej/callpickup/res/res_agi.c
team/oej/callpickup/res/res_config_odbc.c
team/oej/callpickup/res/res_config_pgsql.c
team/oej/callpickup/res/res_features.c
team/oej/callpickup/res/res_jabber.c
team/oej/callpickup/res/res_monitor.c
team/oej/callpickup/res/res_musiconhold.c
team/oej/callpickup/res/res_snmp.c
team/oej/callpickup/res/res_speech.c
team/oej/callpickup/rtp.c
team/oej/callpickup/say.c
team/oej/callpickup/sched.c
team/oej/callpickup/sha1.c
team/oej/callpickup/slinfactory.c
team/oej/callpickup/sounds/Makefile
team/oej/callpickup/srv.c
team/oej/callpickup/tdd.c
team/oej/callpickup/translate.c
team/oej/callpickup/udptl.c
team/oej/callpickup/ulaw.c
team/oej/callpickup/utils.c
team/oej/callpickup/utils/Makefile
team/oej/callpickup/utils/smsq.c
Propchange: team/oej/callpickup/
------------------------------------------------------------------------------
automerge = http://edvina.net/training/
Propchange: team/oej/callpickup/
------------------------------------------------------------------------------
Binary property 'branch-1.2-blocked' - no diff available.
Propchange: team/oej/callpickup/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.
Propchange: team/oej/callpickup/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Mon Aug 7 07:35:41 2006
@@ -21,3 +21,4 @@
config.log
makeopts.xml
autom4te.cache
+muted
Propchange: team/oej/callpickup/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Aug 7 07:35:41 2006
@@ -1,1 +1,1 @@
-/trunk:1-36029
+/trunk:1-39149
Modified: team/oej/callpickup/.cleancount
URL: http://svn.digium.com/view/asterisk/team/oej/callpickup/.cleancount?rev=39150&r1=39149&r2=39150&view=diff
==============================================================================
--- team/oej/callpickup/.cleancount (original)
+++ team/oej/callpickup/.cleancount Mon Aug 7 07:35:41 2006
@@ -1,1 +1,1 @@
-19
+20
Modified: team/oej/callpickup/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/callpickup/Makefile?rev=39150&r1=39149&r2=39150&view=diff
==============================================================================
--- team/oej/callpickup/Makefile (original)
+++ team/oej/callpickup/Makefile Mon Aug 7 07:35:41 2006
@@ -11,7 +11,19 @@
# the GNU General Public License
#
+# All Makefiles use the following variables:
+#
+# LDFLAGS - linker flags (not libraries), used for all links
+# LIBS - additional libraries, at top-level for all links,
+# on a single object just for that object
+# SOLINK - linker flags used only for creating shared objects (.so files),
+# used for all .so links
+#
+
.EXPORT_ALL_VARIABLES:
+
+#Uncomment this to see all build commands instead of 'quiet' output
+#NOISY_BUILD=yes
# Create OPTIONS variable
OPTIONS=
@@ -25,14 +37,14 @@
#SUB_PROC=xscale # or maverick
ifeq ($(CROSS_COMPILE),)
- OSARCH=$(shell uname -s)
- PROC?=$(shell uname -m)
+ OSARCH:=$(shell uname -s)
+ PROC?:=$(shell uname -m)
else
OSARCH=$(CROSS_ARCH)
PROC=$(CROSS_PROC)
endif
-PWD=$(shell pwd)
+ASTTOPDIR:=$(shell pwd)
# Remember the MAKELEVEL at the top
MAKETOPLEVEL?=$(MAKELEVEL)
@@ -66,16 +78,16 @@
# Define standard directories for various platforms
# These apply if they are not redefined in asterisk.conf
ifeq ($(OSARCH),SunOS)
- ASTETCDIR=/etc/opt/asterisk
+ ASTETCDIR=/var/etc/asterisk
ASTLIBDIR=/opt/asterisk/lib
- ASTVARLIBDIR=/var/opt/asterisk/lib
- ASTSPOOLDIR=/var/opt/asterisk/spool
- ASTLOGDIR=/var/opt/asterisk/log
- ASTHEADERDIR=/opt/asterisk/usr/include/asterisk
- ASTBINDIR=/opt/asterisk/usr/bin
- ASTSBINDIR=/opt/asterisk/usr/sbin
- ASTVARRUNDIR=/var/opt/asterisk/run
- ASTMANDIR=/opt/asterisk/usr/share/man
+ ASTVARLIBDIR=/var/opt/asterisk
+ ASTSPOOLDIR=/var/spool/asterisk
+ ASTLOGDIR=/var/log/asterisk
+ ASTHEADERDIR=/opt/asterisk/include
+ ASTBINDIR=/opt/asterisk/bin
+ ASTSBINDIR=/opt/asterisk/sbin
+ ASTVARRUNDIR=/var/run/asterisk
+ ASTMANDIR=/opt/asterisk/man
else
ASTETCDIR=$(sysconfdir)/asterisk
ASTLIBDIR=$(libdir)/asterisk
@@ -132,7 +144,17 @@
MOD_SUBDIR_CFLAGS=-I../include -I..
OTHER_SUBDIR_CFLAGS=-I../include -I..
-ifeq ($(or $(findstring dont-optimize,$(MAKECMDGOALS)),$(findstring DONT_OPTIMIZE,$(MENUSELECT_CFLAGS))),)
+ifeq ($(origin MENUSELECT_CFLAGS),undefined)
+ MENUSELECT_CFLAGS:=$(shell grep MENUSELECT_CFLAGS $(USER_MAKEOPTS) .)
+ ifeq ($(MENUSELECT_CFLAGS),)
+ MENUSELECT_CFLAGS:=$(shell grep MENUSELECT_CFLAGS $(GLOBAL_MAKEOPTS) .)
+ endif
+ ifneq ($(MENUSELECT_CFLAGS),)
+ MENUSELECT_CFLAGS:=$(shell echo $(MENUSELECT_CFLAGS) | cut -f2 -d'=')
+ endif
+endif
+
+ifeq ($(findstring dont-optimize,$(MAKECMDGOALS)),$(findstring DONT_OPTIMIZE,$(MENUSELECT_CFLAGS)))
# More GSM codec optimization
# Uncomment to enable MMXTM optimizations for x86 architecture CPU's
# which support MMX instructions. This should be newer pentiums,
@@ -208,9 +230,6 @@
ASTCFLAGS+=-Werror -Wunused
endif
-ifeq ($(shell gcc -v 2>&1 | grep 'gcc version' | cut -f3 -d' ' | cut -f1 -d.),4)
-ASTCFLAGS+=-Wno-pointer-sign
-endif
ASTOBJ=-o asterisk
ifeq ($(findstring BSD,$(OSARCH)),BSD)
@@ -228,7 +247,7 @@
ifeq ($(OSARCH),FreeBSD)
BSDVERSION=$(shell make -V OSVERSION -f $(CROSS_COMPILE_TARGET)/usr/share/mk/bsd.port.subdir.mk)
ASTCFLAGS+=$(shell if test $(BSDVERSION) -lt 500016 ; then echo "-D_THREAD_SAFE"; fi)
- LIBS+=$(shell if test $(BSDVERSION) -lt 502102 ; then echo "-lc_r"; else echo "-pthread"; fi)
+ AST_LIBS+=$(shell if test $(BSDVERSION) -lt 502102 ; then echo "-lc_r"; else echo "-pthread"; fi)
endif # FreeBSD
ifeq ($(OSARCH),NetBSD)
@@ -240,7 +259,7 @@
endif
ifeq ($(OSARCH),SunOS)
- ASTCFLAGS+=-Wcast-align -DSOLARIS -Iinclude/solaris-compat -I$(CROSS_COMPILE_TARGET)/usr/local/ssl/include
+ ASTCFLAGS+=-Wcast-align -DSOLARIS -Iinclude/solaris-compat -I$(CROSS_COMPILE_TARGET)/opt/ssl/include -I$(CROSS_COMPILE_TARGET)/usr/local/ssl/include
endif
LIBEDIT=editline/libedit.a
@@ -301,13 +320,13 @@
endif
ifeq ($(OSARCH),Linux)
- LIBS+=-ldl -lpthread $(EDITLINE_LIB) -lm -lresolv #-lnjamd
+ AST_LIBS+=-ldl -lpthread $(EDITLINE_LIB) -lm -lresolv #-lnjamd
else
- LIBS+=$(EDITLINE_LIB) -lm
+ AST_LIBS+=$(EDITLINE_LIB) -lm
endif
ifeq ($(OSARCH),Darwin)
- LIBS+=-lresolv
+ AST_LIBS+=-lresolv
ASTCFLAGS+=-D__Darwin__
AUDIO_LIBS=-framework CoreAudio
ASTLINK=-Wl,-dynamic
@@ -322,26 +341,25 @@
ASTLINK=-Wl,-E
SOLINK=-shared -Xlinker -x
ifeq ($(findstring BSD,$(OSARCH)),BSD)
- SOLINK+=-L$(CROSS_COMPILE_TARGET)/usr/local/lib
+ LDFLAGS+=-L$(CROSS_COMPILE_TARGET)/usr/local/lib
endif
endif
ifeq ($(OSARCH),FreeBSD)
- LIBS+=-lcrypto
+ AST_LIBS+=-lcrypto
endif
ifeq ($(OSARCH),NetBSD)
- LIBS+=-lpthread -lcrypto -lm -L$(CROSS_COMPILE_TARGET)/usr/pkg/lib $(EDITLINE_LIB)
+ AST_LIBS+=-lpthread -lcrypto -lm -L$(CROSS_COMPILE_TARGET)/usr/pkg/lib $(EDITLINE_LIB)
endif
ifeq ($(OSARCH),OpenBSD)
- LIBS+=-lcrypto -lpthread -lm $(EDITLINE_LIB)
+ AST_LIBS+=-lcrypto -lpthread -lm $(EDITLINE_LIB)
endif
ifeq ($(OSARCH),SunOS)
- LIBS+=-lpthread -ldl -lnsl -lsocket -lresolv -L$(CROSS_COMPILE_TARGET)/usr/local/ssl/lib
+ AST_LIBS+=-lpthread -ldl -lnsl -lsocket -lresolv -L$(CROSS_COMPILE_TARGET)/opt/ssl/lib -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
@@ -357,6 +375,8 @@
HAVEDOT=no
endif
+include Makefile.rules
+
_all: all
@echo " +--------- Asterisk Build Complete ---------+"
@echo " + Asterisk has successfully been built, but +"
@@ -366,7 +386,7 @@
@echo " + make install +"
@echo " +-------------------------------------------+"
-all: cleantest config.status menuselect.makeopts depend asterisk $(SUBDIRS)
+all: cleantest config.status menuselect.makeopts depend $(SUBDIRS) asterisk
$(MOD_SUBDIRS):
@CFLAGS="$(MOD_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) -C $@
@@ -390,11 +410,8 @@
@echo "****"
@exit 1
-menuselect.makeopts: menuselect/menuselect makeopts.xml
- @menuselect/menuselect --check-deps ${GLOBAL_MAKEOPTS} ${USER_MAKEOPTS} $@
-
-menuselect.makedeps: menuselect/menuselect makeopts.xml
- @menuselect/menuselect --check-deps ${GLOBAL_MAKEOPTS} ${USER_MAKEOPTS} $@
+menuselect.makeopts menuselect.makedeps: menuselect/menuselect makeopts.xml
+ menuselect/menuselect --check-deps $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS) menuselect.makeopts
#ifneq ($(wildcard tags),)
ctags: tags
@@ -405,10 +422,10 @@
endif
editline/config.h:
- cd editline && unset CFLAGS LIBS && CFLAGS="$(OPTIMIZE)" ./configure ; \
+ cd editline && unset CFLAGS AST_LIBS && CFLAGS="$(OPTIMIZE)" ./configure ; \
editline/libedit.a:
- cd editline && unset CFLAGS LIBS && test -f config.h || CFLAGS="$(OPTIMIZE)" ./configure
+ cd editline && unset CFLAGS AST_LIBS && test -f config.h || CFLAGS="$(OPTIMIZE)" ./configure
$(MAKE) -C editline libedit.a
db1-ast/libdb1.a:
@@ -478,16 +495,17 @@
channel.o: CFLAGS+=$(ZAPTEL_INCLUDE)
asterisk: include/asterisk/buildopts.h editline/libedit.a db1-ast/libdb1.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 \
+ @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 ; \
fi
- rm -f include/asterisk/build.h.tmp
- $(CC) -c -o buildinfo.o $(CFLAGS) buildinfo.c
- $(CC) $(DEBUG) $(ASTOBJ) $(ASTLINK) $(OBJS) buildinfo.o $(LIBEDIT) db1-ast/libdb1.a $(LIBS)
+ @rm -f include/asterisk/build.h.tmp
+ @$(CC) -c -o buildinfo.o $(CFLAGS) buildinfo.c
+ @echo " [LD] $(OBJS) buildinfo.o $(LIBEDIT) db1-ast/libdb1.1 $(AST_LIBS) -> $@"
+ @$(CC) $(DEBUG) $(ASTOBJ) $(ASTLINK) $(OBJS) buildinfo.o $(LIBEDIT) db1-ast/libdb1.a $(AST_LIBS)
muted: muted.o
- $(CC) $(AUDIO_LIBS) -o muted muted.o
+muted: LIBS+=$(AUDIO_LIBS)
$(SUBDIRS_CLEAN_DEPEND):
@$(MAKE) -C $(@:-clean-depend=) clean-depend
@@ -509,18 +527,19 @@
@$(MAKE) -C stdtime clean
@$(MAKE) -C menuselect clean
-distclean: dist-clean
-
-dist-clean: clean
+dist-clean: distclean
+
+distclean: clean
@$(MAKE) -C mxml clean
@$(MAKE) -C menuselect dist-clean
@$(MAKE) -C sounds dist-clean
rm -f menuselect.makeopts makeopts makeopts.xml menuselect.makedeps
rm -f config.log config.status
rm -rf autom4te.cache
- rm -f include/autoconfig.h
+ rm -f include/asterisk/autoconfig.h
rm -f include/asterisk/buildopts.h
rm -rf doc/api
+ rm -f build_tools/menuselect-deps
datafiles: all
if [ x`$(ID) -un` = xroot ]; then sh build_tools/mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; fi
@@ -876,16 +895,16 @@
rm -rf $(DESTDIR)$(ASTLOGDIR)
menuselect: menuselect/menuselect makeopts.xml
- - at menuselect/menuselect ${GLOBAL_MAKEOPTS} ${USER_MAKEOPTS} menuselect.makeopts && echo "menuselect changes saved!" || echo "menuselect changes NOT saved!"
-
-menuselect/menuselect: menuselect/menuselect.c menuselect/menuselect_curses.c menuselect/menuselect.h menuselect/linkedlists.h config.status mxml/libmxml.a $(MENUSELECT_OBJS)
- @CFLAGS="-include ../include/asterisk/autoconfig.h" $(MAKE) -C menuselect menuselect
+ - at menuselect/menuselect $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS) menuselect.makeopts && echo "menuselect changes saved!" || echo "menuselect changes NOT saved!"
+
+menuselect/menuselect: menuselect/menuselect.c menuselect/menuselect_curses.c menuselect/menuselect_stub.c menuselect/menuselect.h menuselect/linkedlists.h config.status mxml/libmxml.a
+ @CFLAGS="-include $(ASTTOPDIR)/include/asterisk/autoconfig.h -I$(ASTTOPDIR)/include" PARENTSRC="$(ASTTOPDIR)" $(MAKE) -C menuselect menuselect
mxml/libmxml.a:
- @cd mxml && unset CFLAGS LIBS && test -f config.h || ./configure
+ @cd mxml && unset CFLAGS AST_LIBS && test -f config.h || ./configure
$(MAKE) -C mxml libmxml.a
-makeopts.xml: $(foreach dir,$(MOD_SUBDIRS),$(dir)/*.c) build_tools/cflags.xml sounds/sounds.xml
+makeopts.xml: $(foreach dir,$(MOD_SUBDIRS),$(wildcard $(dir)/*.c) $(wildcard $(dir)/*.cc)) build_tools/cflags.xml sounds/sounds.xml
@echo "Generating list of available modules ..."
@build_tools/prep_moduledeps > $@
Modified: team/oej/callpickup/Makefile.rules
URL: http://svn.digium.com/view/asterisk/team/oej/callpickup/Makefile.rules?rev=39150&r1=39149&r2=39150&view=diff
==============================================================================
--- team/oej/callpickup/Makefile.rules (original)
+++ team/oej/callpickup/Makefile.rules Mon Aug 7 07:35:41 2006
@@ -11,43 +11,83 @@
# the GNU General Public License
#
-define module_o_template
-$(1).o: $(1).c
- $$(CC) -c -o $$@ $$< $$(CFLAGS) $$(MENUSELECT_OPTS_$(1):%=-D%) $(foreach dep,$(MENUSELECT_DEPENDS_$(1)),$$(value $(dep)_INCLUDE))
+# Each command is preceded by a short comment on what to do.
+# Prefixing one or the other with @\# or @ or nothing makes the desired
+# behaviour. ECHO_PREFIX prefixes the comment, CMD_PREFIX prefixes the command.
+
+ifeq ($(NOISY_BUILD),)
+ ECHO_PREFIX=@
+ CMD_PREFIX=@
+else
+ ECHO_PREFIX=@\#
+ CMD_PREFIX=
+endif
+
+define ast_make_o_c
+$(1): $(2)
+ $(ECHO_PREFIX) echo " [CC] $$< -> $$@"
+ $(CMD_PREFIX) $$(CC) -o $$@ -c $$< $$(CFLAGS)
endef
-define module_so_template
-$(1).so: $(1).o
- $$(CC) $$(SOLINK) -o $$@ $$^ $(foreach dep,$(MENUSELECT_DEPENDS_$(1)),$$(value $(dep)_LIB))
+define ast_make_oo_cc
+$(1): $(2)
+ $(ECHO_PREFIX) echo " [CXX] $$< -> $$@"
+ $(CMD_PREFIX) $$(CXX) -o $$@ -c $$< $$(CFLAGS)
endef
-%.o: %.c
- $(CC) -c -o $@ $< $(CFLAGS)
+define ast_make_c_y
+$(1): $(2)
+ $(ECHO_PREFIX) echo " [BISON] $$< -> $$@"
+ $(CMD_PREFIX) bison -o $$@ -d --name-prefix=ast_yy $$<
+endef
-$(foreach mod,$(SELECTED_MODS),$(eval $(call module_o_template,$(mod))))
+define ast_make_c_fl
+$(1): $(2)
+ $(ECHO_PREFIX) echo " [FLEX] $$< -> $$@"
+ $(CMD_PREFIX) flex -o $$@ --full $$<
+endef
-$(foreach mod,$(SELECTED_MODS),$(eval $(call module_so_template,$(mod))))
+define ast_make_so_o
+$(1): $(2)
+ $(ECHO_PREFIX) echo " [LD] $$^ -> $$@"
+ $(CMD_PREFIX) $$(CC) -o $$@ $$(LDFLAGS) $$(SOLINK) $$^ $$(LIBS)
+endef
-.PHONY: clean clean-depend depend uninstall _all
+define ast_make_so_oo
+$(1): $(2)
+ $(ECHO_PREFIX) echo " [LDXX] $$^ -> $$@"
+ $(CMD_PREFIX) $$(CXX) -o $$@ $$(LDFLAGS) $$(SOLINK) $$^ $$(LIBS)
+endef
-_all: $(SELECTED_MODS:%=%.so)
+define ast_make_a_o
+$(1): $(2)
+ $(ECHO_PREFIX) echo " [AR] $$^ -> $$@"
+ $(CMD_PREFIX) $$(AR) cr $$@ $$^
+ $(CMD_PREFIX) $$(RANLIB) $$@
+endef
-clean-depend::
- rm -f .depend
+define ast_make_final
+$(1): $(2)
+ $(ECHO_PREFIX) echo " [LD] $$^ -> $$@"
+ $(CMD_PREFIX) $$(CC) -o $$@ $$(LDFLAGS) $$^ $$(LIBS)
+endef
-clean:: clean-depend
- rm -f *.so *.o
+define ast_make_final_host
+$(1): $(2)
+ $(ECHO_PREFIX) echo " [LD] $$^ -> $$@"
+ $(CMD_PREFIX) $$(HOST_CC) -o $$@ $$(CFLAGS) $$(LDFLAGS) $$^ $$(LIBS)
+endef
-install:: all
- for x in $(SELECTED_MODS:%=%.so); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
+$(eval $(call ast_make_o_c,%.o,%.c))
-uninstall::
+$(eval $(call ast_make_oo_cc,%.oo,%.cc))
-ifneq ($(wildcard .depend),)
- include .depend
-endif
+$(eval $(call ast_make_so_o,%.so,%.o))
-depend: .depend
+$(eval $(call ast_make_so_oo,%.so,%.oo))
-.depend:
- ../build_tools/mkdep $(CFLAGS) `ls *.c`
+$(eval $(call ast_make_final,%,%.o))
+
+$(eval $(call ast_make_c_y,%.c,%.y))
+
+$(eval $(call ast_make_c_fl,%.c,%.fl))
Modified: team/oej/callpickup/UPGRADE.txt
URL: http://svn.digium.com/view/asterisk/team/oej/callpickup/UPGRADE.txt?rev=39150&r1=39149&r2=39150&view=diff
==============================================================================
--- team/oej/callpickup/UPGRADE.txt (original)
+++ team/oej/callpickup/UPGRADE.txt Mon Aug 7 07:35:41 2006
@@ -285,6 +285,23 @@
* Support for MFC/R2 has been removed, as it has not been functional for some
time and it has no maintainer.
+The G726-32 codec:
+
+* It has been determined that previous versions of Asterisk used the wrong codeword
+ packing order for G726-32 data. This version supports both available packing orders,
+ and can transcode between them. It also now selects the proper order when
+ negotiating with a SIP peer based on the codec name supplied in the SDP. However,
+ there are existing devices that improperly request one order and then use another;
+ Sipura and Grandstream ATAs are known to do this, and there may be others. To
+ be able to continue to use these devices with this version of Asterisk and the
+ G726-32 codec, a configuration parameter called 'g726nonstandard' has been added
+ to sip.conf, so that Asterisk can use the packing order expected by the device (even
+ though it requested a different order). In addition, the internal format number for
+ G726-32 has been changed, and the old number is now assigned to AAL2-G726-32. The
+ result of this is that this version of Asterisk will be able to interoperate over
+ IAX2 with older versions of Asterisk, as long as this version is told to allow
+ 'g726aal2' instead of 'g726' as the codec for the call.
+
Installation:
* On BSD systems, the installation directories have changed to more "FreeBSDish"
@@ -298,3 +315,42 @@
ASTETCDIR /usr/local/etc/asterisk
ASTBINDIR /usr/local/bin/asterisk
ASTSBINDIR /usr/local/sbin/asterisk
+
+Music on Hold:
+
+* The music on hold handling has been changed in some significant ways in hopes
+ to make it work in a way that is much less confusing to users. Behavior will
+ not change if the same configuration is used from older versions of Asterisk.
+ However, there are some new configuration options that will make things work
+ in a way that makes more sense.
+
+ Previously, many of the channel drivers had an option called "musicclass" or
+ something similar. This option set what music on hold class this channel
+ would *hear* when put on hold. Some people expected (with good reason) that
+ this option was to configure what music on hold class to play when putting
+ the bridged channel on hold. This option has now been deprecated.
+
+ Two new music on hold related configuration options for channel drivers have
+ been introduced. Some channel drivers support both options, some just one,
+ and some support neither of them. Check the sample configuration files to see
+ which options apply to which channel driver.
+
+ The "mohsuggest" option specifies which music on hold class to suggest to the
+ bridged channel when putting them on hold. The only way that this class can
+ be overridden is if the bridged channel has a specific music class set that
+ was done in the dialplan using Set(CHANNEL(musicclass)=something).
+
+ The "mohinterpret" option is similar to the old "musicclass" option. It
+ specifies which music on hold class this channel would like to listen to when
+ put on hold. This music class is only effective if this channel has no music
+ class set on it from the dialplan and the bridged channel putting this one on
+ hold had no "mohsuggest" setting.
+
+ The IAX2 and Zap channel drivers have an additional feature for the
+ "mohinterpret" option. If this option is set to "passthrough", then these
+ channel drivers will pass through the HOLD message in signalling instead of
+ starting music on hold on the channel. An example for how this would be
+ useful is in an enterprise network of Asterisk servers. When one phone on one
+ server puts a phone on a different server on hold, the remote server will be
+ responsibile for playing the hold music to its local phone that was put on
+ hold instead of the far end server across the network playing the music.
Modified: team/oej/callpickup/acinclude.m4
URL: http://svn.digium.com/view/asterisk/team/oej/callpickup/acinclude.m4?rev=39150&r1=39149&r2=39150&view=diff
==============================================================================
--- team/oej/callpickup/acinclude.m4 (original)
+++ team/oej/callpickup/acinclude.m4 Mon Aug 7 07:35:41 2006
@@ -1,73 +1,83 @@
-# AST_EXT_LIB([NAME], [FUNCTION], [package header], [package symbol name], [package friendly name], [additional LIB data])
+# AST_EXT_LIB_SETUP([package symbol name], [package friendly name], [package option name], [additional help text])
-AC_DEFUN([AST_EXT_LIB],
+AC_DEFUN([AST_EXT_LIB_SETUP],
[
-AC_ARG_WITH([$1], AC_HELP_STRING([--with-$1=PATH],[use $5 files in PATH]),[
+$1_DESCRIP="$2"
+$1_OPTION="$3"
+AC_ARG_WITH([$3], AC_HELP_STRING([--with-$3=PATH],[use $2 files in PATH $4]),[
case ${withval} in
n|no)
- USE_$4=no
+ USE_$1=no
;;
y|ye|yes)
- $4_MANDATORY="yes"
+ $1_MANDATORY="yes"
;;
*)
- $4_DIR="${withval}"
- $4_MANDATORY="yes"
+ $1_DIR="${withval}"
+ $1_MANDATORY="yes"
;;
esac
])
+PBX_$1=0
+AC_SUBST([$1_LIB])
+AC_SUBST([$1_INCLUDE])
+AC_SUBST([PBX_$1])
+])
-PBX_LIB$4=0
+# AST_EXT_LIB_CHECK([package symbol name], [package library name], [function to check], [package header], [additional LIB data])
-if test "${USE_$4}" != "no"; then
+AC_DEFUN([AST_EXT_LIB_CHECK],
+[
+if test "${USE_$1}" != "no"; then
pbxlibdir=""
- if test "x${$4_DIR}" != "x"; then
- pbxlibdir="-L${$1_DIR}/lib"
+ if test "x${$1_DIR}" != "x"; then
+ if test -d ${$1_DIR}/lib; then
+ pbxlibdir="-L${$1_DIR}/lib"
+ else
+ pbxlibdir="-L${$1_DIR}"
+ fi
fi
- AC_CHECK_LIB([$1], [$2], [AST_$4_FOUND=yes], [AST_$4_FOUND=no], ${pbxlibdir} $6)
+ AC_CHECK_LIB([$2], [$3], [AST_$1_FOUND=yes], [AST_$1_FOUND=no], ${pbxlibdir} $5)
- if test "${AST_$4_FOUND}" = "yes"; then
- $4_LIB="-l$1 $6"
- $4_HEADER_FOUND="1"
- if test "x${$4_DIR}" != "x"; then
- $4_LIB="${pbxlibdir} ${$4_LIB}"
- $4_INCLUDE="-I${$4_DIR}/include"
- if test "x$3" != "x" ; then
- AC_CHECK_HEADER([${$4_DIR}/include/$3], [$4_HEADER_FOUND=1], [$4_HEADER_FOUND=0] )
+ if test "${AST_$1_FOUND}" = "yes"; then
+ $1_LIB="-l$2 $5"
+ $1_HEADER_FOUND="1"
+ if test "x${$1_DIR}" != "x"; then
+ $1_LIB="${pbxlibdir} ${$1_LIB}"
+ $1_INCLUDE="-I${$1_DIR}/include"
+ if test "x$4" != "x" ; then
+ AC_CHECK_HEADER([${$1_DIR}/include/$4], [$1_HEADER_FOUND=1], [$1_HEADER_FOUND=0] )
fi
else
- if test "x$3" != "x" ; then
- AC_CHECK_HEADER([$3], [$4_HEADER_FOUND=1], [$4_HEADER_FOUND=0] )
+ if test "x$4" != "x" ; then
+ AC_CHECK_HEADER([$4], [$1_HEADER_FOUND=1], [$1_HEADER_FOUND=0] )
fi
fi
- if test "x${$4_HEADER_FOUND}" = "x0" ; then
- if test ! -z "${$4_MANDATORY}" ;
+ if test "x${$1_HEADER_FOUND}" = "x0" ; then
+ if test ! -z "${$1_MANDATORY}" ;
then
echo " ***"
- echo " *** It appears that you do not have the $1 development package installed."
- echo " *** Please install it to include $5 support, or re-run configure"
- echo " *** without explicitly specifying --with-$1"
+ echo " *** It appears that you do not have the $2 development package installed."
+ echo " *** Please install it to include ${$1_DESCRIP} support, or re-run configure"
+ echo " *** without explicitly specifying --with-${$1_OPTION}"
exit 1
fi
- $4_LIB=""
- $4_INCLUDE=""
- PBX_LIB$4=0
+ $1_LIB=""
+ $1_INCLUDE=""
+ PBX_$1=0
else
- PBX_LIB$4=1
- AC_DEFINE_UNQUOTED([HAVE_$4], 1, [Define to indicate the $5 library])
+ PBX_$1=1
+ AC_DEFINE_UNQUOTED([HAVE_$1], 1, [Define to indicate the ${$1_DESCRIP} library])
fi
- elif test ! -z "${$4_MANDATORY}";
+ elif test ! -z "${$1_MANDATORY}";
then
echo "***"
- echo "*** The $5 installation on this system appears to be broken."
+ echo "*** The ${$1_DESCRIP} installation on this system appears to be broken."
echo "*** Either correct the installation, or run configure"
- echo "*** without explicity specifying --with-$1"
+ echo "*** without explicitly specifying --with-${$1_OPTION}"
exit 1
fi
fi
-AC_SUBST([$4_LIB])
-AC_SUBST([$4_INCLUDE])
-AC_SUBST([PBX_LIB$4])
])
Modified: team/oej/callpickup/acl.c
URL: http://svn.digium.com/view/asterisk/team/oej/callpickup/acl.c?rev=39150&r1=39149&r2=39150&view=diff
==============================================================================
--- team/oej/callpickup/acl.c (original)
+++ team/oej/callpickup/acl.c Mon Aug 7 07:35:41 2006
@@ -90,7 +90,7 @@
void ast_free_ha(struct ast_ha *ha)
{
struct ast_ha *hal;
- while(ha) {
+ while (ha) {
hal = ha;
ha = ha->next;
free(hal);
@@ -122,9 +122,9 @@
/* Used in chan_sip2 templates */
struct ast_ha *ast_duplicate_ha_list(struct ast_ha *original)
{
- struct ast_ha *start=original;
+ struct ast_ha *start = original;
struct ast_ha *ret = NULL;
- struct ast_ha *link,*prev=NULL;
+ struct ast_ha *link, *prev = NULL;
while (start) {
link = ast_duplicate_ha(start); /* Create copy of this object */
@@ -167,7 +167,7 @@
if (!strchr(nm, '.')) {
if ((sscanf(nm, "%d", &x) == 1) && (x >= 0) && (x <= 32)) {
y = 0;
- for (z=0;z<x;z++) {
+ for (z = 0; z < x; z++) {
y >>= 1;
y |= 0x80000000;
}
@@ -208,10 +208,9 @@
char iabuf[INET_ADDRSTRLEN];
char iabuf2[INET_ADDRSTRLEN];
/* DEBUG */
- ast_log(LOG_DEBUG,
- "##### Testing %s with %s\n",
- ast_inet_ntoa(iabuf, sizeof(iabuf), sin->sin_addr),
- ast_inet_ntoa(iabuf2, sizeof(iabuf2), ha->netaddr));
+ ast_copy_string(iabuf, ast_inet_ntoa(sin->sin_addr), sizeof(iabuf));
+ ast_copy_string(iabuf2, ast_inet_ntoa(ha->netaddr), sizeof(iabuf2));
+ ast_log(LOG_DEBUG, "##### Testing %s with %s\n", iabuf, iabuf2);
/* For each rule, if this address and the netmask = the net address
apply the current rule */
if ((sin->sin_addr.s_addr & ha->netmask.s_addr) == ha->netaddr.s_addr)
@@ -423,3 +422,4 @@
return 0;
return -1;
}
+
Modified: team/oej/callpickup/agi/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/callpickup/agi/Makefile?rev=39150&r1=39149&r2=39150&view=diff
==============================================================================
--- team/oej/callpickup/agi/Makefile (original)
+++ team/oej/callpickup/agi/Makefile Mon Aug 7 07:35:41 2006
@@ -15,12 +15,17 @@
AGIS=agi-test.agi eagi-test eagi-sphinx-test jukebox.agi
-LIBS=
ifeq ($(OSARCH),SunOS)
- LIBS=-lsocket -lnsl ../strcompat.o
+ LIBS+=-lsocket -lnsl ../strcompat.o
endif
+include $(ASTTOPDIR)/Makefile.rules
+
all: $(AGIS)
+
+eagi-test: eagi-test.o
+
+eagi-sphinx-test: eagi-sphinx-test.o
install: all
mkdir -p $(DESTDIR)$(AGI_DIR)
@@ -29,20 +34,11 @@
uninstall:
for x in $(AGIS); do rm -f $(DESTDIR)$(AGI_DIR)/$$x ; done
-eagi-test: eagi-test.o
- $(CC) $(CFLAGS) -include ../include/autoconfig.h -o eagi-test eagi-test.o $(LIBS)
-
-eagi-sphinx-test: eagi-sphinx-test.o
- $(CC) $(CFLAGS) -include ../include/autoconfig.h -o eagi-sphinx-test eagi-sphinx-test.o $(LIBS)
-
clean-depend:
rm -f .depend
clean: clean-depend
rm -f *.so *.o look eagi-test eagi-sphinx-test
-
-%.so : %.o
- $(CC) -shared -Xlinker -x -o $@ $<
ifneq ($(wildcard .depend),)
include .depend
Modified: team/oej/callpickup/app.c
URL: http://svn.digium.com/view/asterisk/team/oej/callpickup/app.c?rev=39150&r1=39149&r2=39150&view=diff
==============================================================================
--- team/oej/callpickup/app.c (original)
+++ team/oej/callpickup/app.c Mon Aug 7 07:35:41 2006
@@ -65,12 +65,12 @@
struct tone_zone_sound *ts;
int res=0, x=0;
- if(maxlen > size)
+ if (maxlen > size)
maxlen = size;
- if(!timeout && chan->pbx)
+ if (!timeout && chan->pbx)
timeout = chan->pbx->dtimeout;
- else if(!timeout)
+ else if (!timeout)
timeout = 5;
ts = ast_get_indication_tone(chan->zone,"dial");
@@ -99,8 +99,6 @@
return res;
}
-
-
/*! \param timeout set timeout to 0 for "standard" timeouts. Set timeout to -1 for
"ludicrous time" (essentially never times out) */
int ast_app_getdata(struct ast_channel *c, char *prompt, char *s, int maxlen, int timeout)
@@ -128,7 +126,7 @@
int ast_app_getdata_full(struct ast_channel *c, char *prompt, char *s, int maxlen, int timeout, int audiofd, int ctrlfd)
{
- int res,to,fto;
+ int res, to, fto;
if (prompt) {
res = ast_streamfile(c, prompt, c->language);
if (res < 0)
@@ -538,7 +536,7 @@
stringp = fmts;
strsep(&stringp, "|");
- ast_log(LOG_DEBUG,"Recording Formats: sfmts=%s\n", fmts);
+ ast_log(LOG_DEBUG, "Recording Formats: sfmts=%s\n", fmts);
sfmt[0] = ast_strdupa(fmts);
while ((fmt = strsep(&stringp, "|"))) {
@@ -555,9 +553,8 @@
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "x=%d, open writing: %s format: %s, %p\n", x, prepend ? prependfile : recordfile, sfmt[x], others[x]);
- if (!others[x]) {
+ if (!others[x])
break;
- }
}
if (path)
@@ -705,7 +702,7 @@
if (!others[x])
break;
if (res > 0)
- ast_stream_rewind(others[x], totalsilence ? totalsilence-200 : 200);
+ ast_stream_rewind(others[x], totalsilence ? totalsilence - 200 : 200);
ast_truncstream(others[x]);
ast_closestream(others[x]);
}
@@ -720,7 +717,7 @@
realfiles[x] = ast_readfile(recordfile, sfmt[x], comment, O_RDONLY, 0, 0);
if (!others[x] || !realfiles[x])
break;
- ast_stream_rewind(others[x], totalsilence ? totalsilence-200 : 200);
+ ast_stream_rewind(others[x], totalsilence ? totalsilence - 200 : 200);
ast_truncstream(others[x]);
/* add the original file too */
while ((fr = ast_readframe(realfiles[x]))) {
@@ -925,7 +922,7 @@
snprintf(fs, strlen(path) + 19, "%s/.lock-%08lx", path, ast_random());
fd = open(fs, O_WRONLY | O_CREAT | O_EXCL, 0600);
if (fd < 0) {
- fprintf(stderr, "Unable to create lock file '%s': %s\n", path, strerror(errno));
+ ast_log(LOG_ERROR, "Unable to create lock file '%s': %s\n", path, strerror(errno));
return AST_LOCK_PATH_NOT_FOUND;
}
close(fd);
@@ -934,11 +931,13 @@
start = time(NULL);
while (((res = link(fs, s)) < 0) && (errno == EEXIST) && (time(NULL) - start < 5))
usleep(1);
+
+ unlink(fs);
+
if (res) {
ast_log(LOG_WARNING, "Failed to lock path '%s': %s\n", path, strerror(errno));
return AST_LOCK_TIMEOUT;
} else {
- unlink(fs);
ast_log(LOG_DEBUG, "Locked path '%s'\n", path);
return AST_LOCK_SUCCESS;
}
@@ -947,11 +946,21 @@
int ast_unlock_path(const char *path)
{
char *s;
- if (!(s = alloca(strlen(path) + 10)))
+ int res;
+
+ if (!(s = alloca(strlen(path) + 10))) {
+ ast_log(LOG_WARNING, "Out of memory!\n");
return -1;
+ }
+
snprintf(s, strlen(path) + 9, "%s/%s", path, ".lock");
- ast_log(LOG_DEBUG, "Unlocked path '%s'\n", path);
- return unlink(s);
+
+ if ((res = unlink(s)))
+ ast_log(LOG_ERROR, "Could not unlock path '%s': %s\n", path, strerror(errno));
+ else
+ ast_log(LOG_DEBUG, "Unlocked path '%s'\n", path);
+
+ return res;
}
int ast_record_review(struct ast_channel *chan, const char *playfile, const char *recordfile, int maxtime, const char *fmt, int *duration, const char *path)
@@ -1056,6 +1065,7 @@
#define RES_RESTART ((1 << 19) | RES_REPEAT)
[... 64459 lines stripped ...]
More information about the svn-commits
mailing list