[asterisk-commits] murf: branch murf/bug11210 r92445 - in /team/murf/bug11210: ./ apps/ build_to...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Dec 12 10:32:06 CST 2007


Author: murf
Date: Wed Dec 12 10:32:05 2007
New Revision: 92445

URL: http://svn.digium.com/view/asterisk?view=rev&rev=92445
Log:
Merged revisions 91942-92442 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
  r91951 | rizzo | 2007-12-08 10:58:08 -0700 (Sat, 08 Dec 2007) | 2 lines
  
  document a nice technique to exit from a block in case of errors.
................
  r91952 | rizzo | 2007-12-08 11:05:42 -0700 (Sat, 08 Dec 2007) | 2 lines
  
  normalize formatting
................
  r91953 | rizzo | 2007-12-08 11:18:28 -0700 (Sat, 08 Dec 2007) | 3 lines
  
  unify some common code
................
  r91962 | rizzo | 2007-12-08 11:50:32 -0700 (Sat, 08 Dec 2007) | 4 lines
  
  Implement comment_buffer and lline_buffer in terms of the ast_str_*() API.
  I don't know if comment_buffers etc are actually used at all...
................
  r91983 | rizzo | 2007-12-08 12:06:01 -0700 (Sat, 08 Dec 2007) | 4 lines
  
  remove unused code, and simplify the logic for #include/#exec
  (still a lot of cleanup needed here).
................
  r92002 | rizzo | 2007-12-09 09:47:25 -0700 (Sun, 09 Dec 2007) | 33 lines
  
  Implement the outcome of a discussion on the -dev list re. the use
  of DESTDIR and INSTALL_PATH - many thanks to Tzafrir Cohen and
  Simon Perreault for extremely useful feedback:
   
  1. comment out the [directories] section the created asterisk.conf ;
     you can set the correct defaults at build time using INSTALL_PATH,
     so the repetition here is redundant and often wrong.
     (The next step now is move asterisk.conf outside the Makefile to
     asterisk.conf.sample, because there is little if anything here
     that needs to be constructed at build/install time).
   
  2. use DESTDIR?=$(INSTALL_PATH) so you only need to specify a path
     once if the two coincide. This should have no ill side effects, 
     because if you don't specify DESTDIR, you really need
     INSTALL_PATH="" to set the correct defaults, and if you specify
     DESTDIR the value is not overridden.
  
  The second part required moving the 'export DESTDIR' right after
  the assignment to prevent DESTDIR getting set by the export 
  (this is documented in the Makefile).o hopefully avoid the mistake)$
  
  With this change you can now do something like this from your source tree:
  
  	make INSTALL_PATH=/some/place install samples
  
  and then
  
  	main/asterisk -vdc
  
  which will pick up the correct config files and libraries from
  /some/place - i.e. great for developers!
................
  r92022 | rizzo | 2007-12-09 14:29:37 -0700 (Sun, 09 Dec 2007) | 4 lines
  
  normalize subdirs' Makefile by using ASTTOPDIR and not .. to reference
  the top level directory.
................
  r92023 | rizzo | 2007-12-09 14:32:30 -0700 (Sun, 09 Dec 2007) | 2 lines
  
  another place where ../ should have been ASTTOPDIR
................
  r92042 | rizzo | 2007-12-09 15:55:58 -0700 (Sun, 09 Dec 2007) | 2 lines
  
  add hashtab.c to the list of files deleted
................
  r92062 | rizzo | 2007-12-09 18:54:40 -0700 (Sun, 09 Dec 2007) | 3 lines
  
  document usage of several exported variables
................
  r92063 | rizzo | 2007-12-09 19:06:40 -0700 (Sun, 09 Dec 2007) | 3 lines
  
  make the install target a bit less noisy
................
  r92082 | rizzo | 2007-12-09 20:50:38 -0700 (Sun, 09 Dec 2007) | 23 lines
  
  Put into Makefile.moddir_rules the common instructions used to
  generate loadable and embedded module lists.
  
  Individual Makefiles now are a lot simpler, possibly as simple as this:
  
      -include $(ASTTOPDIR)/menuselect.makeopts $(ASTTOPDIR)/menuselect.makedeps
      MODULE_PREFIX=cdr_
      all: _all
      include $(ASTTOPDIR)/Makefile.moddir_rules
  
  and also more flexible because in a single directory we can combine
  various types of modules (app_, cdr_, func_, ... ) by simply
  listing them in the MODULE_PREFIX variable.
  
  The individual Makefiles can also create list of modules to be
  excluded by listing them in the variablel MODULE_EXCLUDE (see an
  example in channels/Makefile).
  
  With this change it becomes trivial to integrate a directory with
  locally created/modified sources into the main build.
................
  r92083 | rizzo | 2007-12-09 21:18:07 -0700 (Sun, 09 Dec 2007) | 7 lines
  
  Fix the detection of modules installed from this build.
  
  You can now add the path of local module subdirs from the command line with
     make LOCAL_MOD_SUBDIRS= ....
................
  r92084 | rizzo | 2007-12-09 21:38:49 -0700 (Sun, 09 Dec 2007) | 3 lines
  
  add a bit of info on the build infrastructure
................
  r92103 | rizzo | 2007-12-10 01:35:35 -0700 (Mon, 10 Dec 2007) | 2 lines
  
  simplify this file
................
  r92104 | rizzo | 2007-12-10 01:40:59 -0700 (Mon, 10 Dec 2007) | 12 lines
  
  remove relative paths and use ASTTOPDIR instead.
  
  Give a default value to ASTTOPDIR if unset so we can at least
  do a 'make clean' without too much trouble.
  
  The proper fix, however, is to partition the top level
  Makefile in a 'setup' and a 'main' part, in a way that the
  'setup' part can be included from subdirs' Makefiles and
  allow targets to be built without going through the
  top level Makefile.
................
  r92122 | rizzo | 2007-12-10 02:00:44 -0700 (Mon, 10 Dec 2007) | 2 lines
  
  simplify/cleanup the scripts
................
  r92140 | oej | 2007-12-10 06:29:57 -0700 (Mon, 10 Dec 2007) | 8 lines
  
  Add a few extra headers in the voicemail users listing in
  manager 1.1. Update documentation too.
  
  (closes issue #11495)
  Reported by: caio1982
  Patches: 
        extra_vm_manager_info1.diff uploaded by caio1982 (license 22)
................
  r92159 | oej | 2007-12-10 07:10:24 -0700 (Mon, 10 Dec 2007) | 24 lines
  
  Merged revisions 92158 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
  r92158 | oej | 2007-12-10 15:04:44 +0100 (MÃ¥n, 10 Dec 2007) | 16 lines
  
  Avoid reinvite race situations with two Asterisks trying
  to reinvite each other in 1.4 and trunk. 
  
  This patch implements support for the 491 error code that
  Asterisk 1.4 generates on situations where we get an 
  incoming INVITE and already has one in progress.
  
  Thanks to mavetju for reporting and to Raj Jain for an
  excellent explanation of the problem.
  
  Patch by myself. Tested with 8 Asterisk servers connected
  to each other in a training network.
  
  Closes issue #10481
  
  
  ........
................
  r92160 | oej | 2007-12-10 07:18:21 -0700 (Mon, 10 Dec 2007) | 2 lines
  
  Removing some LOG_DEBUG items
................
  r92199 | file | 2007-12-10 09:07:33 -0700 (Mon, 10 Dec 2007) | 4 lines
  
  Only send a SIGHUP if the pid is greater than -1, otherwise all PIDs greater than -1 will get the SIGHUP... and that is bad.
  (closes issue #11453)
  Reported by: alanmcmillan
................
  r92201 | file | 2007-12-10 09:15:06 -0700 (Mon, 10 Dec 2007) | 11 lines
  
  Blocked revisions 92200 via svnmerge
  
  ........
  r92200 | file | 2007-12-10 12:13:43 -0400 (Mon, 10 Dec 2007) | 4 lines
  
  It is possible for nativeformats to contain more then one codec, so print out multiple ones.
  (closes issue #11366)
  Reported by: ovi
  
  ........
................
  r92203 | mmichelson | 2007-12-10 09:30:46 -0700 (Mon, 10 Dec 2007) | 15 lines
  
  Merged revisions 92202 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
  r92202 | mmichelson | 2007-12-10 10:29:44 -0600 (Mon, 10 Dec 2007) | 7 lines
  
  If there are no members in a queue, then the loop where the datastore for detecting
  duplicate dialed numbers will be skipped, meaning the datastore isn't created. This means
  that when we try to free it, there's a crash. This stops that crash from occurring.
  
  (closes issue #11499, reported by slavon, patched by eliel)
  
  
  ........
................
  r92205 | file | 2007-12-10 09:37:35 -0700 (Mon, 10 Dec 2007) | 14 lines
  
  Merged revisions 92204 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
  r92204 | file | 2007-12-10 12:36:15 -0400 (Mon, 10 Dec 2007) | 6 lines
  
  Add G729A as another possible payload name for G729. Some devices use this instead of G729, which is perfectly normal since the payload number itself is defined and can't be used by anything else so the name doesn't matter that much.
  (closes issue #11483)
  Reported by: revolution
  Patches:
        rtp.diff uploaded by revolution (license 346)
  
  ........
................
  r92206 | file | 2007-12-10 09:48:18 -0700 (Mon, 10 Dec 2007) | 4 lines
  
  Add ast_atomic_fetchadd_int_slow to check_expr for platforms that need it.
  (closes issue #11484)
  Reported by: snuffy
................
  r92243 | dbailey | 2007-12-10 13:18:25 -0700 (Mon, 10 Dec 2007) | 2 lines
  
  Add CLI commands to dynamically set hw and sw gains
................
  r92267 | oej | 2007-12-11 02:26:25 -0700 (Tue, 11 Dec 2007) | 2 lines
  
  Doxygen updates
................
  r92285 | oej | 2007-12-11 07:17:29 -0700 (Tue, 11 Dec 2007) | 2 lines
  
  A lot of doxygen updates
................
  r92305 | russell | 2007-12-11 09:29:29 -0700 (Tue, 11 Dec 2007) | 5 lines
  
  * In unaligned.h, remove some unnecessary casts and mark the arg of the 
    get_unaligned functions as const
  * In event.c, use get_unaligned_uint32() in a couple of places to fix issues on
    architectures that don't allow unaligned access
................
  r92324 | mmichelson | 2007-12-11 10:44:42 -0700 (Tue, 11 Dec 2007) | 18 lines
  
  Merged revisions 92323 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
  r92323 | mmichelson | 2007-12-11 11:42:25 -0600 (Tue, 11 Dec 2007) | 10 lines
  
  Fixing autofill to be more accurate. Specifically, if calls ahead of the current
  caller were ringing members (but not yet bridged) there could be available members
  and waiting callers who would not get matched up. The member availability checker
  was correctly determining the number of available members in this scenario, but
  the queue itself did not parallelly reflect this status on the pending calls. This
  commit corrects the issue.
  
  (closes issue #11459, reported by equissoftware, patched by me)
  
  
  ........
................
  r92364 | file | 2007-12-11 12:52:37 -0700 (Tue, 11 Dec 2007) | 14 lines
  
  Merged revisions 92363 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
  r92363 | file | 2007-12-11 15:51:40 -0400 (Tue, 11 Dec 2007) | 6 lines
  
  Fix potential memory leak with the dialed interfaces list if another memory allocation fails.
  (closes issue #11507)
  Reported by: eliel
  Patches:
        global_datastores.c.patch uploaded by eliel (license 64)
  
  ........
................
  r92365 | file | 2007-12-11 13:06:43 -0700 (Tue, 11 Dec 2007) | 4 lines
  
  Only look to see if options are set if some have been provided.
  (closes issue #11505)
  Reported by: Mike Anikienko
................
  r92401 | qwell | 2007-12-11 14:17:37 -0700 (Tue, 11 Dec 2007) | 4 lines
  
  Add variable to show which key was pressed to stop playback.
  
  Issue #11377, initial patch by johan.
................
  r92402 | mmichelson | 2007-12-11 14:46:16 -0700 (Tue, 11 Dec 2007) | 4 lines
  
  Removing a pointless memset. The memory was just calloc'd, so the 
  memory is already zeroed out
................
  r92421 | qwell | 2007-12-11 14:58:26 -0700 (Tue, 11 Dec 2007) | 4 lines
  
  We need to set the address we want to match against before we actually do the match..
  
  Closes issue #11518.
................
  r92422 | mmichelson | 2007-12-11 15:10:43 -0700 (Tue, 11 Dec 2007) | 6 lines
  
  Trunk build would fail due to the nonexistence of zaptel hwgain
  structures missing. Patched configure to check for this stuff and
  put a #ifdef around the offending code in chan_zap. Thanks to file
  for overseeing this.
................
  r92423 | oej | 2007-12-11 15:20:22 -0700 (Tue, 11 Dec 2007) | 6 lines
  
  Doxygen updates, formatting. 
  
  misdn stuff needs a lot of doxygenification
  
  (Hello, Qwell :-) )
................

Modified:
    team/murf/bug11210/   (props changed)
    team/murf/bug11210/Makefile
    team/murf/bug11210/Makefile.moddir_rules
    team/murf/bug11210/apps/Makefile
    team/murf/bug11210/apps/app_controlplayback.c
    team/murf/bug11210/apps/app_queue.c
    team/murf/bug11210/apps/app_voicemail.c
    team/murf/bug11210/build_tools/make_version
    team/murf/bug11210/build_tools/make_version_h
    team/murf/bug11210/cdr/Makefile
    team/murf/bug11210/channels/DialTone.h
    team/murf/bug11210/channels/Makefile
    team/murf/bug11210/channels/chan_sip.c
    team/murf/bug11210/channels/chan_zap.c
    team/murf/bug11210/channels/gentone.c
    team/murf/bug11210/channels/iax2.h
    team/murf/bug11210/channels/misdn/chan_misdn_config.h
    team/murf/bug11210/channels/misdn/ie.c
    team/murf/bug11210/channels/misdn/isdn_lib.c
    team/murf/bug11210/channels/misdn/isdn_lib.h
    team/murf/bug11210/channels/misdn/isdn_msg_parser.c
    team/murf/bug11210/channels/misdn/portinfo.c
    team/murf/bug11210/codecs/Makefile
    team/murf/bug11210/configure
    team/murf/bug11210/configure.ac
    team/murf/bug11210/doc/CODING-GUIDELINES
    team/murf/bug11210/doc/manager_1_1.txt
    team/murf/bug11210/formats/Makefile
    team/murf/bug11210/funcs/Makefile
    team/murf/bug11210/include/asterisk/_private.h
    team/murf/bug11210/include/asterisk/adsi.h
    team/murf/bug11210/include/asterisk/ael_structs.h
    team/murf/bug11210/include/asterisk/aes.h
    team/murf/bug11210/include/asterisk/agi.h
    team/murf/bug11210/include/asterisk/alaw.h
    team/murf/bug11210/include/asterisk/app.h
    team/murf/bug11210/include/asterisk/ast_expr.h
    team/murf/bug11210/include/asterisk/astdb.h
    team/murf/bug11210/include/asterisk/astobj2.h
    team/murf/bug11210/include/asterisk/autoconfig.h.in
    team/murf/bug11210/include/asterisk/callerid.h
    team/murf/bug11210/include/asterisk/causes.h
    team/murf/bug11210/include/asterisk/cdr.h
    team/murf/bug11210/include/asterisk/devicestate.h
    team/murf/bug11210/include/asterisk/doxyref.h
    team/murf/bug11210/include/asterisk/dsp.h
    team/murf/bug11210/include/asterisk/event.h
    team/murf/bug11210/include/asterisk/extconf.h
    team/murf/bug11210/include/asterisk/frame.h
    team/murf/bug11210/include/asterisk/hashtab.h
    team/murf/bug11210/include/asterisk/io.h
    team/murf/bug11210/include/asterisk/localtime.h
    team/murf/bug11210/include/asterisk/logger.h
    team/murf/bug11210/include/asterisk/manager.h
    team/murf/bug11210/include/asterisk/mod_format.h
    team/murf/bug11210/include/asterisk/term.h
    team/murf/bug11210/include/asterisk/transcap.h
    team/murf/bug11210/include/asterisk/translate.h
    team/murf/bug11210/include/asterisk/udptl.h
    team/murf/bug11210/include/asterisk/ulaw.h
    team/murf/bug11210/include/asterisk/unaligned.h
    team/murf/bug11210/include/asterisk/zapata.h
    team/murf/bug11210/include/jitterbuf.h
    team/murf/bug11210/main/config.c
    team/murf/bug11210/main/cygload.c
    team/murf/bug11210/main/event.c
    team/murf/bug11210/main/global_datastores.c
    team/murf/bug11210/main/rtp.c
    team/murf/bug11210/pbx/Makefile
    team/murf/bug11210/res/Makefile
    team/murf/bug11210/res/res_agi.c
    team/murf/bug11210/res/res_monitor.c
    team/murf/bug11210/res/res_musiconhold.c
    team/murf/bug11210/utils/Makefile
    team/murf/bug11210/utils/check_expr.c
    team/murf/bug11210/utils/clicompat.c

Propchange: team/murf/bug11210/
------------------------------------------------------------------------------
Binary property 'branch-1.4-blocked' - no diff available.

Propchange: team/murf/bug11210/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Propchange: team/murf/bug11210/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Dec 12 10:32:05 2007
@@ -1,1 +1,1 @@
-/trunk:1-91941
+/trunk:1-92442

Modified: team/murf/bug11210/Makefile
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/Makefile?view=diff&rev=92445&r1=92444&r2=92445
==============================================================================
--- team/murf/bug11210/Makefile (original)
+++ team/murf/bug11210/Makefile Wed Dec 12 10:32:05 2007
@@ -20,16 +20,29 @@
 # SOLINK - linker flags used only for creating shared objects (.so files),
 #      used for all .so links
 #
-# Default values fo ASTCFLAGS and ASTLDFLAGS can be specified in the
+# Default values for ASTCFLAGS and ASTLDFLAGS can be specified in the
 # environment when running make, as follows:
 #
 # $ ASTCFLAGS="-Werror" make
 
-export ASTTOPDIR
+# You can add the path of local module subdirs from the command line with
+#   make LOCAL_MOD_SUBDIRS= ....
+
+export ASTTOPDIR		# Top level dir, used in subdirs' Makefiles
 export ASTERISKVERSION
 export ASTERISKVERSIONNUM
-export INSTALL_PATH
-export ASTETCDIR
+
+#--- values used for default paths
+
+# DESTDIR is the staging (or final) directory where files are copied
+# during the install process. Define it before 'export', otherwise
+# export will set it to the empty string making ?= fail.
+# WARNING: do not put spaces or comments after the value.
+DESTDIR?=$(INSTALL_PATH)
+export DESTDIR
+
+export INSTALL_PATH	# Additional prefix for the following paths
+export ASTETCDIR		# Path for config files
 export ASTVARRUNDIR
 export MODULES_DIR
 export ASTSPOOLDIR
@@ -43,24 +56,31 @@
 export ASTSBINDIR
 export AGI_DIR
 export ASTCONFPATH
-export NOISY_BUILD
-export MENUSELECT_CFLAGS
-export AST_DEVMODE
+
+export OSARCH			# Operating system
+export PROC			# Processor type
+
+export NOISY_BUILD		# Used in Makefile.rules
+export MENUSELECT_CFLAGS	# Options selected in menuselect.
+export AST_DEVMODE		# Set to "yes" for additional compiler
+				# and runtime checks
+
+export SOLINK			# linker flags for shared objects
+export STATIC_BUILD		# Additional cflags, set to -static
+				# for static builds. Probably
+				# should go directly to ASTLDFLAGS
+
+#--- paths to various commands
 export CC
 export CXX
 export AR
 export RANLIB
 export HOST_CC
-export STATIC_BUILD
 export INSTALL
-export DESTDIR
-export PROC
-export SOLINK
 export STRIP
 export DOWNLOAD
 export GREP
 export ID
-export OSARCH
 
 # even though we could use '-include makeopts' here, use a wildcard
 # lookup anyway, so that make won't try to build makeopts if it doesn't
@@ -77,9 +97,6 @@
 #Uncomment this to see all build commands instead of 'quiet' output
 #NOISY_BUILD=yes
 
-# Create OPTIONS variable
-OPTIONS=
-
 ASTTOPDIR:=$(CURDIR)
 
 # Overwite config files on "make samples"
@@ -88,12 +105,6 @@
 # Include debug and macro symbols in the executables (-g) and profiling info (-pg)
 DEBUG=-g3
 
-# Staging directory
-# Files are copied here temporarily during the install process
-# For example, make DESTDIR=/tmp/asterisk woud put things in
-# /tmp/asterisk/etc/asterisk
-# !!! Watch out, put no spaces or comments after the value !!!
-#DESTDIR?=/tmp/asterisk
 
 # Define standard directories for various platforms
 # These apply if they are not redefined in asterisk.conf 
@@ -160,6 +171,9 @@
 MOD_SUBDIR_CFLAGS=-I$(ASTTOPDIR)/include
 OTHER_SUBDIR_CFLAGS=-I$(ASTTOPDIR)/include
 
+# Create OPTIONS variable, but probably we can assign directly to ASTCFLAGS
+OPTIONS=
+
 ifeq ($(OSARCH),linux-gnu)
   ifeq ($(PROC),x86_64)
     # You must have GCC 3.4 to use k8, otherwise use athlon
@@ -246,12 +260,16 @@
 endif
 
 ifneq ($(wildcard .svn),)
-  ASTERISKVERSIONNUM=999999
-endif
-
+  ASTERISKVERSIONNUM:=999999
+endif
+
+# XXX MALLOC_DEBUG is probably unused, Makefile.moddir_rules adds the
+#	value directly to ASTCFLAGS
+# XXX BUSYDETECT is probably useless, the only similar reference is to
+#	#ifdef BUSYDETECT in main/dsp.c
 ASTCFLAGS+=$(MALLOC_DEBUG)$(BUSYDETECT)$(OPTIONS)
 
-MOD_SUBDIRS:=channels pbx apps codecs formats cdr funcs main res
+MOD_SUBDIRS:=channels pbx apps codecs formats cdr funcs main res $(LOCAL_MOD_SUBDIRS)
 OTHER_SUBDIRS:=utils agi
 SUBDIRS:=$(OTHER_SUBDIRS) $(MOD_SUBDIRS)
 SUBDIRS_INSTALL:=$(SUBDIRS:%=%-install)
@@ -489,9 +507,9 @@
 	fi
 
 $(SUBDIRS_INSTALL):
-	@DESTDIR="$(DESTDIR)" ASTSBINDIR="$(ASTSBINDIR)" $(MAKE) -C $(@:-install=) install
-
-NEWMODS=$(notdir $(wildcard */*.so))
+	@DESTDIR="$(DESTDIR)" ASTSBINDIR="$(ASTSBINDIR)" $(MAKE) --quiet $(PRINT_DIR) -C $(@:-install=) install
+
+NEWMODS:=$(foreach d,$(MOD_SUBDIRS),$(notdir $(wildcard $(d)/*.so)))
 OLDMODS=$(filter-out $(NEWMODS),$(notdir $(wildcard $(DESTDIR)$(MODULES_DIR)/*.so)))
 
 oldmodcheck:
@@ -578,7 +596,7 @@
 	@if [ "$(OVERWRITE)" = "y" ] || [ ! -f $(DESTDIR)$(ASTCONFPATH) ]; then \
 		echo "Creating asterisk.conf"; \
 		( \
-		echo "[directories]" ; \
+		echo "[directories](!) ; remove the (!) to enable this" ; \
 		echo "astetcdir => $(ASTETCDIR)" ; \
 		echo "astmoddir => $(MODULES_DIR)" ; \
 		echo "astvarlibdir => $(ASTVARLIBDIR)" ; \

Modified: team/murf/bug11210/Makefile.moddir_rules
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/Makefile.moddir_rules?view=diff&rev=92445&r1=92444&r2=92445
==============================================================================
--- team/murf/bug11210/Makefile.moddir_rules (original)
+++ team/murf/bug11210/Makefile.moddir_rules Wed Dec 12 10:32:05 2007
@@ -34,7 +34,40 @@
 
 include $(ASTTOPDIR)/Makefile.rules
 
-#comma:=,	# not used
+# If MODULE_PREFIX is defined, use it to run the standard functions to set
+# C_MODS, CC_MODS, LOADABLE_MODS and EMBEDDED_MODS.
+# Each word of MODULE_PREFIX is a prefix for filenames that we consider
+# valid C or CC modules (eg. app_, func_ ...).
+# Use MODULE_EXCLUDE to specify additional modules to exclude.
+
+ifneq ($(MODULE_PREFIX),)
+    # Compute the lowercase and uppercase directory name. The former
+    # is used as a key in MENUSELECT_EMBED, the latter is part of
+    # the name of the MENUSELECT_* variable containing the exclude list
+    # generated by menuselect.
+    A:=$(notdir $(CURDIR))
+    B:=$(shell echo $A | tr "[a-z]" "[A-Z]")
+    # MENUSELECT_$(L) contains the list of modules excluded by menuselect.
+    # MODULE_EXCLUDE contains the locally generated exclude list
+    L:=$(MENUSELECT_$(B)) $(MODULE_EXCLUDE)
+    # construct the list of C and CC modules from the content of the directory
+    C_MODS:=
+    CC_MODS:=
+    C_MODS+=$(foreach pre,$(MODULE_PREFIX),$(filter-out $(L),$(patsubst %.c,%,$(wildcard $(pre)*.c))))
+    CC_MODS+=$(foreach pre,$(MODULE_PREFIX),$(filter-out $(L),$(patsubst %.cc,%,$(wildcard $(pre)*.cc))))
+
+    # and store in the list of embedded or loadable modules
+    ifneq ($(findstring $(A),$(MENUSELECT_EMBED)),)
+	EMBEDDED_MODS:=$(C_MODS) $(CC_MODS)
+    else
+	LOADABLE_MODS:=$(C_MODS) $(CC_MODS)
+    endif
+endif
+# debugging
+# x:=$(shell echo 'in $(B)' >&2)
+# x:=$(shell echo 'filtered out $(L)' >&2)
+# x:=$(shell echo 'C_MODS= $(C_MODS)' >&2)
+# x:=$(shell sleep 2)
 
 # Both C++ and C++ sources need their module name in AST_MODULE
 # We also pass whatever _INCLUDE list is generated by menuselect
@@ -66,7 +99,7 @@
 ifneq ($(findstring $(OSARCH), mingw32 cygwin ),)
   # linker options and extra libraries for cygwin
   SOLINK=-Wl,--out-implib=lib$@.a -shared
-  LIBS+=-L../main -lasterisk -L../res $($@_LIBS)
+  LIBS+=-L$(ASTTOPDIR)/main -lasterisk -L$(ASTTOPDIR)/res $($@_LIBS)
   # additional libraries in res/
 endif
 endif
@@ -99,7 +132,8 @@
 	rm -f modules.link
 
 install:: all
-	for x in $(LOADABLE_MODS:%=%.so); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
+	@echo "Installing modules from `basename $(CURDIR)`..."
+	@for x in $(LOADABLE_MODS:%=%.so); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
 
 uninstall::
 

Modified: team/murf/bug11210/apps/Makefile
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/apps/Makefile?view=diff&rev=92445&r1=92444&r2=92445
==============================================================================
--- team/murf/bug11210/apps/Makefile (original)
+++ team/murf/bug11210/apps/Makefile Wed Dec 12 10:32:05 2007
@@ -9,31 +9,25 @@
 # the GNU General Public License
 #
 
--include ../menuselect.makeopts ../menuselect.makedeps
+-include $(ASTTOPDIR)/menuselect.makeopts $(ASTTOPDIR)/menuselect.makedeps
 
-C_MODS:=$(filter-out $(MENUSELECT_APPS),$(patsubst %.c,%,$(wildcard app_*.c)))
-CC_MODS:=$(filter-out $(MENUSELECT_APPS),$(patsubst %.cc,%,$(wildcard app_*.cc)))
+#interesting files in this directory start with app_
+MODULE_PREFIX=app_
 
-LOADABLE_MODS:=$(C_MODS) $(CC_MODS)
-
-ifneq ($(findstring apps,$(MENUSELECT_EMBED)),)
-  EMBEDDED_MODS:=$(LOADABLE_MODS)
-  LOADABLE_MODS:=
-endif
-
+# create extra MENUSELECT_DEPENDS entries.
 MENUSELECT_OPTS_app_directory:=$(MENUSELECT_OPTS_app_voicemail)
 ifneq ($(findstring ODBC_STORAGE,$(MENUSELECT_OPTS_app_voicemail)),)
-MENUSELECT_DEPENDS_app_voicemail+=$(MENUSELECT_DEPENDS_ODBC_STORAGE)
-MENUSELECT_DEPENDS_app_directory+=$(MENUSELECT_DEPENDS_ODBC_STORAGE)
+  MENUSELECT_DEPENDS_app_voicemail+=$(MENUSELECT_DEPENDS_ODBC_STORAGE)
+  MENUSELECT_DEPENDS_app_directory+=$(MENUSELECT_DEPENDS_ODBC_STORAGE)
 endif
 ifneq ($(findstring IMAP_STORAGE,$(MENUSELECT_OPTS_app_voicemail)),)
-MENUSELECT_DEPENDS_app_voicemail+=$(MENUSELECT_DEPENDS_IMAP_STORAGE)
-MENUSELECT_DEPENDS_app_directory+=$(MENUSELECT_DEPENDS_IMAP_STORAGE)
+  MENUSELECT_DEPENDS_app_voicemail+=$(MENUSELECT_DEPENDS_IMAP_STORAGE)
+  MENUSELECT_DEPENDS_app_directory+=$(MENUSELECT_DEPENDS_IMAP_STORAGE)
 endif
 
 ifeq (SunOS,$(shell uname))
-MENUSELECT_DEPENDS_app_chanspy+=RT
-RT_LIB=-lrt
+  MENUSELECT_DEPENDS_app_chanspy+=RT
+  RT_LIB=-lrt
 endif
 
 all: _all

Modified: team/murf/bug11210/apps/app_controlplayback.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/apps/app_controlplayback.c?view=diff&rev=92445&r1=92444&r2=92445
==============================================================================
--- team/murf/bug11210/apps/app_controlplayback.c (original)
+++ team/murf/bug11210/apps/app_controlplayback.c Wed Dec 12 10:32:05 2007
@@ -55,7 +55,9 @@
 "  CPLAYBACKSTATUS -  This variable contains the status of the attempt as a text\n"
 "                     string, one of: SUCCESS | USERSTOPPED | ERROR\n"
 "  CPLAYBACKOFFSET -  This contains the offset in ms into the file where\n"
-"                     playback was at when it stopped.  -1 is end of file.\n";
+"                     playback was at when it stopped.  -1 is end of file.\n"
+"  CPLAYBACKSTOPKEY - If the playback is stopped by the user this variable contains\n"
+"                     the key that was pressed.\n";
 
 enum {
 	OPT_OFFSET = (1 << 1),
@@ -82,6 +84,7 @@
 	int skipms = 0;
 	long offsetms = 0;
 	char offsetbuf[20];
+	char stopkeybuf[2];
 	char *tmp;
 	struct ast_flags opts = { 0, };
 	char *opt_args[OPT_ARG_ARRAY_LEN];
@@ -132,8 +135,10 @@
 
 	/* If we stopped on one of our stop keys, return 0  */
 	if (res > 0 && args.stop && strchr(args.stop, res)) {
+		pbx_builtin_setvar_helper(chan, "CPLAYBACKSTATUS", "USERSTOPPED");
+		snprintf(stopkeybuf, sizeof(stopkeybuf), "%c", res);
+		pbx_builtin_setvar_helper(chan, "CPLAYBACKSTOPKEY", stopkeybuf);
 		res = 0;
-		pbx_builtin_setvar_helper(chan, "CPLAYBACKSTATUS", "USERSTOPPED");
 	} else {
 		if (res < 0) {
 			res = 0;

Modified: team/murf/bug11210/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/apps/app_queue.c?view=diff&rev=92445&r1=92444&r2=92445
==============================================================================
--- team/murf/bug11210/apps/app_queue.c (original)
+++ team/murf/bug11210/apps/app_queue.c Wed Dec 12 10:32:05 2007
@@ -345,6 +345,7 @@
 	time_t last_pos;                    /*!< Last time we told the user their position */
 	int opos;                           /*!< Where we started in the queue */
 	int handled;                        /*!< Whether our call was handled */
+	int pending;                        /*!< Non-zero if we are attempting to call a member */
 	int max_penalty;                    /*!< Limit the members that can take this call to this penalty or lower */
 	int linpos;							/*!< If using linear strategy, what position are we at? */
 	int linwrapped;						/*!< Is the linpos wrapped? */
@@ -2501,7 +2502,7 @@
 
 		ast_debug(1, "There are %d available members.\n", avl);
 	
-		while ((idx < avl) && (ch) && (ch != qe)) {
+		while ((idx < avl) && (ch) &&  !ch->pending && (ch != qe)) {
 			idx++;
 			ch = ch->next;			
 		}
@@ -2928,13 +2929,16 @@
 	else
 		to = (qe->parent->timeout) ? qe->parent->timeout * 1000 : -1;
 	orig = to;
+	++qe->pending;
 	ring_one(qe, outgoing, &numbusies);
 	ao2_unlock(qe->parent);
 	if (use_weight)
 		ao2_unlock(queues);
 	lpeer = wait_for_answer(qe, outgoing, &to, &digit, numbusies, ast_test_flag(&(bridge_config.features_caller), AST_FEATURE_DISCONNECT), forwardsallowed);
-	ast_channel_datastore_remove(qe->chan, datastore);
-	ast_channel_datastore_free(datastore);
+	if (datastore) {
+		ast_channel_datastore_remove(qe->chan, datastore);
+		ast_channel_datastore_free(datastore);
+	}
 	ao2_lock(qe->parent);
 	if (qe->parent->strategy == QUEUE_STRATEGY_RRMEMORY) {
 		store_next_rr(qe, outgoing);
@@ -2945,6 +2949,7 @@
 	ao2_unlock(qe->parent);
 	peer = lpeer ? lpeer->chan : NULL;
 	if (!peer) {
+		qe->pending = 0;
 		if (to) {
 			/* Must gotten hung up */
 			res = -1;

Modified: team/murf/bug11210/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/apps/app_voicemail.c?view=diff&rev=92445&r1=92444&r2=92445
==============================================================================
--- team/murf/bug11210/apps/app_voicemail.c (original)
+++ team/murf/bug11210/apps/app_voicemail.c Wed Dec 12 10:32:05 2007
@@ -7960,8 +7960,14 @@
 			      "UniqueID: %s\r\n"
 			      "ExitContext: %s\r\n"
 			      "SayDurationMinimum: %d\r\n"
+			      "SayEnvelope: %s\r\n"
+			      "SayCID: %s\r\n"
+			      "AttachMessage: %s\r\n"
 			      "AttachmentFormat: %s\r\n"
+			      "DeleteMessage: %s\r\n"
 			      "VolumeGain: %.2f\r\n"
+			      "CanReview: %s\r\n"
+			      "CallOperator: %s\r\n"
 			      "MaxMessageCount: %d\r\n"
 			      "MaxMessageLength: %d\r\n"
 			      "NewMessageCount: %d\r\n"
@@ -7970,11 +7976,31 @@
 			      "IMAPUser: %s\r\n"
 #endif
 			      "\r\n",
-			      actionid, vmu->context, vmu->mailbox, vmu->fullname, vmu->email,
-			      vmu->pager, vmu->serveremail, vmu->mailcmd, vmu->language,
-			      vmu->zonetag, vmu->callback, vmu->dialout, vmu->uniqueid,
-			      vmu->exit, vmu->saydurationm, vmu->attachfmt, vmu->volgain,
-			      vmu->maxmsg, vmu->maxsecs, 
+			      actionid,
+			      vmu->context,
+			      vmu->mailbox,
+			      vmu->fullname,
+			      vmu->email,
+			      vmu->pager,
+			      vmu->serveremail,
+			      vmu->mailcmd,
+			      vmu->language,
+			      vmu->zonetag,
+			      vmu->callback,
+			      vmu->dialout,
+			      vmu->uniqueid,
+			      vmu->exit,
+			      vmu->saydurationm,
+			      ast_test_flag(vmu, VM_ENVELOPE) ? "Yes" : "No",
+			      ast_test_flag(vmu, VM_SAYCID) ? "Yes" : "No",
+			      ast_test_flag(vmu, VM_ATTACH) ? "Yes" : "No",
+			      vmu->attachfmt,
+			      ast_test_flag(vmu, VM_DELETE) ? "Yes" : "No",
+			      vmu->volgain,
+			      ast_test_flag(vmu, VM_REVIEW) ? "Yes" : "No",
+			      ast_test_flag(vmu, VM_OPERATOR) ? "Yes" : "No",
+			      vmu->maxmsg,
+			      vmu->maxsecs,
 #ifdef IMAP_STORAGE
 				  new, old, vmu->imapuser
 #else

Modified: team/murf/bug11210/build_tools/make_version
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/build_tools/make_version?view=diff&rev=92445&r1=92444&r2=92445
==============================================================================
--- team/murf/bug11210/build_tools/make_version (original)
+++ team/murf/bug11210/build_tools/make_version Wed Dec 12 10:32:05 2007
@@ -7,71 +7,60 @@
     BRANCH=0
     TEAM=0
     TAG=0
-    
+
     REV=`svnversion -c ${1} | cut -d: -f2`
 
     BASE=`LANG=C svn pg svnmerge-integrated ${1} | cut -d: -f1`
-    
-    if [ "${PARTS}" = "trunk" ]
-	then
+
+    if [ "${PARTS}" = "trunk" ] ; then
 	echo SVN-trunk-r${REV}
 	exit 0
     fi
-    
-    for PART in $PARTS
-      do
-      if [ ${TAG} != 0 ]
-	  then
+
+    for PART in $PARTS ; do
+      if [ ${TAG} != 0 ] ; then
 	  RESULT="${PART}"
 	  break
       fi
-      
-      if [ ${BRANCH} != 0 ]
-	  then
-	  if [ -z ${RESULT} ]
-	    then
+
+      if [ ${BRANCH} != 0 ] ; then
+	  if [ -z ${RESULT} ] ; then
 	    RESULT="${PART}"
 	  else
 	    RESULT="${RESULT}-${PART}"
 	  fi
 	  break
       fi
-      
-      if [ ${TEAM} != 0 ]
-	  then
-	  if [ -z ${RESULT} ]
-	    then
+
+      if [ ${TEAM} != 0 ] ; then
+	  if [ -z ${RESULT} ] ; then
 	    RESULT="${PART}"
 	  else
 	    RESULT="${RESULT}-${PART}"
 	  fi
 	  continue
       fi
-      
-      if [ "${PART}" = "branches" ]
-	  then
+
+      if [ "${PART}" = "branches" ] ; then
 	  BRANCH=1
 	  RESULT="branch"
 	  continue
       fi
-      
-      if [ "${PART}" = "tags" ]
-	  then
+
+      if [ "${PART}" = "tags" ] ; then
 	  TAG=1
 	  continue
       fi
-      
-      if [ "${PART}" = "team" ]
-	  then
+
+      if [ "${PART}" = "team" ] ; then
 	  TEAM=1
 	  continue
       fi
     done
-    
-    if [ ${TAG} != 0 ]
-	then
+
+    if [ ${TAG} != 0 ] ; then
 	echo ${RESULT}
-	else
+    else
 	echo SVN-${RESULT}-r${REV}${BASE:+-${BASE}}
     fi
 fi

Modified: team/murf/bug11210/build_tools/make_version_h
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/build_tools/make_version_h?view=diff&rev=92445&r1=92444&r2=92445
==============================================================================
--- team/murf/bug11210/build_tools/make_version_h (original)
+++ team/murf/bug11210/build_tools/make_version_h Wed Dec 12 10:32:05 2007
@@ -1,25 +1,17 @@
 #!/bin/sh
 if [ ! -f ../.flavor ]; then
-    cat << END
+    EXTRA=""
+else
+    aadkver=`cat ../.version`
+    aadkflavor=`cat ../.flavor`
+    EXTRA=" (${aadkflavor} ${aadkver})"
+fi
+cat << END
 /*
  * version.h 
  * Automatically generated
  */
-#define ASTERISK_VERSION "${ASTERISKVERSION}"
+#define ASTERISK_VERSION "${ASTERISKVERSION}${EXTRA}"
 #define ASTERISK_VERSION_NUM ${ASTERISKVERSIONNUM}
 
 END
-else
-    aadkver=`cat ../.version`
-    aadkflavor=`cat ../.flavor`
-    cat << END
-/*
- * version.h 
- * Automatically generated
- */
-#define ASTERISK_VERSION "${ASTERISKVERSION} (${aadkflavor} ${aadkver})"
-#define ASTERISK_VERSION_NUM ${ASTERISKVERSIONNUM}
-
-END
-fi
-

Modified: team/murf/bug11210/cdr/Makefile
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/cdr/Makefile?view=diff&rev=92445&r1=92444&r2=92445
==============================================================================
--- team/murf/bug11210/cdr/Makefile (original)
+++ team/murf/bug11210/cdr/Makefile Wed Dec 12 10:32:05 2007
@@ -9,17 +9,9 @@
 # the GNU General Public License
 #
 
--include ../menuselect.makeopts ../menuselect.makedeps
+-include $(ASTTOPDIR)/menuselect.makeopts $(ASTTOPDIR)/menuselect.makedeps
 
-C_MODS:=$(filter-out $(MENUSELECT_CDR),$(patsubst %.c,%,$(wildcard cdr_*.c)))
-CC_MODS:=$(filter-out $(MENUSELECT_CDR),$(patsubst %.cc,%,$(wildcard cdr_*.cc)))
-
-LOADABLE_MODS:=$(C_MODS) $(CC_MODS)
-
-ifneq ($(findstring cdr,$(MENUSELECT_EMBED)),)
-  EMBEDDED_MODS:=$(LOADABLE_MODS)
-  LOADABLE_MODS:=
-endif
+MODULE_PREFIX=cdr_
 
 all: _all
 

Modified: team/murf/bug11210/channels/DialTone.h
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/channels/DialTone.h?view=diff&rev=92445&r1=92444&r2=92445
==============================================================================
--- team/murf/bug11210/channels/DialTone.h (original)
+++ team/murf/bug11210/channels/DialTone.h Wed Dec 12 10:32:05 2007
@@ -8,6 +8,11 @@
   * Distributed under the terms of the GNU General Public License
   *
   */
+
+/*! \file
+ * \brief
+ * 8-bit raw data
+ */
 
 static unsigned char DialTone[] = {
 0xff, 0xab, 0x9d, 0x96, 0x91, 0x90, 0x91, 0x96, 0x9c, 0xaa, 

Modified: team/murf/bug11210/channels/Makefile
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/channels/Makefile?view=diff&rev=92445&r1=92444&r2=92445
==============================================================================
--- team/murf/bug11210/channels/Makefile (original)
+++ team/murf/bug11210/channels/Makefile Wed Dec 12 10:32:05 2007
@@ -9,10 +9,9 @@
 # the GNU General Public License
 #
 
--include ../menuselect.makeopts ../menuselect.makedeps
+-include $(ASTTOPDIR)/menuselect.makeopts $(ASTTOPDIR)/menuselect.makedeps
 
-C_MODS:=$(filter-out $(MENUSELECT_CHANNELS),$(patsubst %.c,%,$(wildcard chan_*.c)))
-CC_MODS:=$(filter-out $(MENUSELECT_CHANNELS),$(patsubst %.cc,%,$(wildcard chan_*.cc)))
+MODULE_PREFIX=chan_
 
 ifeq ($(OSARCH),OpenBSD)
   PTLIB=-lpt_OpenBSD_x86_r
@@ -36,13 +35,13 @@
   H323LIB=-lh323_NetBSD_x86_r
 endif
 
+MODULE_EXCLUDE:=
 ifneq ($(findstring $(OSARCH), mingw32 cygwin ),)
-  C_MODS:=$(filter-out chan_oss,$(C_MODS))
-  C_MODS:=$(filter-out chan_unistim,$(C_MODS))
+  MODULE_EXCLUDE+= chan_oss chan_unistim
 endif
 
 ifeq ($(wildcard h323/libchanh323.a),)
-  CC_MODS:=$(filter-out chan_h323,$(CC_MODS))
+  MODULE_EXCLUDE += chan_h323
 endif
 
 ifndef OPENH323DIR
@@ -51,13 +50,6 @@
 
 ifndef PWLIBDIR
   PWLIBDIR=$(HOME)/pwlib
-endif
-
-LOADABLE_MODS:=$(C_MODS) $(CC_MODS)
-
-ifneq ($(findstring channels,$(MENUSELECT_EMBED)),)
-  EMBEDDED_MODS:=$(LOADABLE_MODS)
-  LOADABLE_MODS:=
 endif
 
 all: _all

Modified: team/murf/bug11210/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/channels/chan_sip.c?view=diff&rev=92445&r1=92444&r2=92445
==============================================================================
--- team/murf/bug11210/channels/chan_sip.c (original)
+++ team/murf/bug11210/channels/chan_sip.c Wed Dec 12 10:32:05 2007
@@ -1134,6 +1134,7 @@
 						*/
 	
 	int initid;				/*!< Auto-congest ID if appropriate (scheduler) */
+	int waitid;				/*!< Wait ID for scheduler after 491 or other delays */
 	int autokillid;				/*!< Auto-kill ID (scheduler) */
 	enum transfermodes allowtransfer;	/*!< REFER: restriction scheme */
 	struct sip_refer *refer;		/*!< REFER: SIP transfer data structure */
@@ -1833,7 +1834,7 @@
 	Functions for enabling debug per IP or fully, or enabling history logging for
 	a SIP dialog
 */
-static void sip_dump_history(struct sip_pvt *dialog);	/* Dump history to LOG_DEBUG at end of dialog, before destroying data */
+static void sip_dump_history(struct sip_pvt *dialog);	/* Dump history to debuglog at end of dialog, before destroying data */
 static inline int sip_debug_test_addr(const struct sockaddr_in *addr);
 static inline int sip_debug_test_pvt(struct sip_pvt *p);
 static void append_history_full(struct sip_pvt *p, const char *fmt, ...);
@@ -2387,14 +2388,16 @@
 	 *    when passed to ast_apply_ha() so it does need to be remapped.
 	 *    This fourth condition is checked later.
 	 */
-	int want_remap = localaddr &&
-		(externip.sin_addr.s_addr || stunaddr.sin_addr.s_addr) &&
-		ast_apply_ha(localaddr, &theirs) == AST_SENSE_ALLOW ;
+	int want_remap;
 
 	*us = internip;		/* starting guess for the internal address */
 	/* now ask the system what would it use to talk to 'them' */
 	ast_ouraddrfor(them, &us->sin_addr);
 	theirs.sin_addr = *them;
+
+	want_remap = localaddr &&
+		(externip.sin_addr.s_addr || stunaddr.sin_addr.s_addr) &&
+		ast_apply_ha(localaddr, &theirs) == AST_SENSE_ALLOW ;
 
 	if (want_remap &&
 	    (!global_matchexterniplocally || !ast_apply_ha(localaddr, us)) ) {
@@ -2652,8 +2655,7 @@
 
 	/* If there are packets still waiting for delivery, delay the destruction */
 	if (p->packets) {
-		if (option_debug > 2)

[... 3334 lines stripped ...]



More information about the asterisk-commits mailing list