[asterisk/f16] 1.8.6.0
Jeffrey C. Ollie
jcollie at fedoraproject.org
Tue Sep 20 14:30:21 UTC 2011
commit 79d1ed796aa08221e547616da5962f2c85bcac07
Author: Jeffrey C. Ollie <jeff at ocjtech.us>
Date: Tue Sep 20 09:30:03 2011 -0500
1.8.6.0
.gitignore | 2 +
...it-scripts-for-better-Fedora-compatibilty.patch | 6 +-
...les.conf-so-that-different-voicemail-modu.patch | 8 +-
...king-building-against-an-external-libedit.patch | 18 ++--
...rary-function-for-loading-command-history.patch | 10 +-
0005-Fix-up-some-paths.patch | 10 +-
...hema-that-is-compatible-with-Fedora-Direc.patch | 8 +-
...chan_mgcp-and-res_pktccops-because-res_pk.patch | 26 ++++
...hat-AST_ARGS-is-used-consistently-in-Fedo.patch | 63 +++++++++
...se-consistently-in-the-Fedora-init-script.patch | 25 ++++
...hat-the-Fedora-init-script-can-find-the-p.patch | 27 ++++
...the-inotify-code-to-handle-call-files-bei.patch | 136 ++++++++++++++++++++
0012-Fix-two-problems-with-app_sms.patch | 64 +++++++++
asterisk.spec | 67 ++++++++++-
sources | 4 +-
15 files changed, 440 insertions(+), 34 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 1692bf2..9d6a67b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -52,3 +52,5 @@ asterisk-1.8.0-beta3.tar.gz.asc
/asterisk-1.8.6.0-rc1.tar.gz.asc
/asterisk-1.8.6.0-rc2.tar.gz
/asterisk-1.8.6.0-rc2.tar.gz.asc
+/asterisk-1.8.6.0.tar.gz
+/asterisk-1.8.6.0.tar.gz.asc
diff --git a/0001-Modify-init-scripts-for-better-Fedora-compatibilty.patch b/0001-Modify-init-scripts-for-better-Fedora-compatibilty.patch
index 4b54d10..1d8f321 100644
--- a/0001-Modify-init-scripts-for-better-Fedora-compatibilty.patch
+++ b/0001-Modify-init-scripts-for-better-Fedora-compatibilty.patch
@@ -1,7 +1,7 @@
-From 821affc49f8970cd2d16c22d528025db24b95f58 Mon Sep 17 00:00:00 2001
+From c9e668f62d3cce2df1ab80f16727debd99739764 Mon Sep 17 00:00:00 2001
From: "Jeffrey C. Ollie" <jeff at ocjtech.us>
Date: Wed, 28 Jul 2010 07:22:21 -0500
-Subject: [PATCH 1/6] Modify init scripts for better Fedora compatibilty.
+Subject: [PATCH 01/12] Modify init scripts for better Fedora compatibilty.
---
contrib/init.d/rc.redhat.asterisk | 70 ++++++++++++++++++++-----------------
@@ -169,5 +169,5 @@ index 0000000..dab2e33
+# A place to specify extra arguments for the Asterisk command line
+AST_EXTRA_ARGS=""
--
-1.7.5.2
+1.7.6.2
diff --git a/0002-Modify-modules.conf-so-that-different-voicemail-modu.patch b/0002-Modify-modules.conf-so-that-different-voicemail-modu.patch
index 933c952..2b3ee2e 100644
--- a/0002-Modify-modules.conf-so-that-different-voicemail-modu.patch
+++ b/0002-Modify-modules.conf-so-that-different-voicemail-modu.patch
@@ -1,8 +1,8 @@
-From 90d69518a6a3de4c1af75815b792e46f34059882 Mon Sep 17 00:00:00 2001
+From 1762acc9571412d03e5ef5fcf936bc0046e8f152 Mon Sep 17 00:00:00 2001
From: "Jeffrey C. Ollie" <jeff at ocjtech.us>
Date: Wed, 28 Jul 2010 07:23:49 -0500
-Subject: [PATCH 2/6] Modify modules.conf so that different voicemail modules
- don't load at the same time.
+Subject: [PATCH 02/12] Modify modules.conf so that different voicemail
+ modules don't load at the same time.
---
configs/modules.conf.sample | 26 ++++++++++++++++++++++++++
@@ -43,5 +43,5 @@ index 38e33e1..9a1c1c3 100644
+;noload => app_directory_plain.so
+;noload => app_voicemail_plain.so
--
-1.7.5.2
+1.7.6.2
diff --git a/0003-Allow-linking-building-against-an-external-libedit.patch b/0003-Allow-linking-building-against-an-external-libedit.patch
index ab09728..9674b4f 100644
--- a/0003-Allow-linking-building-against-an-external-libedit.patch
+++ b/0003-Allow-linking-building-against-an-external-libedit.patch
@@ -1,7 +1,7 @@
-From 931c4451f75158ec3ef1e1a5edea248e3d139961 Mon Sep 17 00:00:00 2001
+From 2ec862ecc0024bd4e9a14bd0a2ddc62ad75465ea Mon Sep 17 00:00:00 2001
From: "Jeffrey C. Ollie" <jeff at ocjtech.us>
Date: Fri, 5 Mar 2010 14:10:52 -0600
-Subject: [PATCH 3/6] Allow linking/building against an external libedit.
+Subject: [PATCH 03/12] Allow linking/building against an external libedit.
The Asterisk tarball includes a very old copy of the editline library
that manages command line history and editing. Fedora (and several
@@ -31,7 +31,7 @@ index 35573c3..4425204 100644
LUA=@PBX_LUA@
MISDN=@PBX_MISDN@
diff --git a/configure.ac b/configure.ac
-index 889586a..f9bb9ac 100644
+index c05d33f..4bd07ed 100644
--- a/configure.ac
+++ b/configure.ac
@@ -388,6 +388,7 @@ AST_EXT_LIB_SETUP([JACK], [Jack Audio Connection Kit], [jack])
@@ -42,7 +42,7 @@ index 889586a..f9bb9ac 100644
AST_EXT_LIB_SETUP([LIBXML2], [LibXML2], [libxml2])
AST_EXT_LIB_SETUP([LTDL], [libtool], [ltdl])
AST_EXT_LIB_SETUP([LUA], [Lua], [lua])
-@@ -2158,6 +2159,27 @@ AC_SUBST(PBX_GTK2)
+@@ -2161,6 +2162,27 @@ AC_SUBST(PBX_GTK2)
AC_SUBST(GTK2_INCLUDE)
AC_SUBST(GTK2_LIB)
@@ -71,10 +71,10 @@ index 889586a..f9bb9ac 100644
# or iODBC
diff --git a/main/Makefile b/main/Makefile
-index 64ad43f..27ef6c8 100644
+index 07143aa..269ca10 100644
--- a/main/Makefile
+++ b/main/Makefile
-@@ -143,6 +143,8 @@ testexpr2: ast_expr2f.c ast_expr2.c ast_expr2.h
+@@ -144,6 +144,8 @@ testexpr2: ast_expr2f.c ast_expr2.c ast_expr2.h
$(CC) -g -o testexpr2 ast_expr2f.o ast_expr2.o -lm
rm ast_expr2.o ast_expr2f.o
@@ -83,7 +83,7 @@ index 64ad43f..27ef6c8 100644
ifneq ($(findstring ENABLE_UPLOADS,$(MENUSELECT_CFLAGS)),)
http.o: _ASTCFLAGS+=$(GMIME_INCLUDE)
endif
-@@ -177,13 +179,13 @@ endif
+@@ -178,13 +180,13 @@ endif
$(OBJS): _ASTCFLAGS+=-DAST_MODULE=\"core\"
@@ -102,7 +102,7 @@ index 64ad43f..27ef6c8 100644
ifeq ($(GNU_LD),1)
diff --git a/main/cli.c b/main/cli.c
-index 7f4c179..b85c219 100644
+index 407973f..52faf4d 100644
--- a/main/cli.c
+++ b/main/cli.c
@@ -36,6 +36,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
@@ -135,5 +135,5 @@ index 3cde814..f86b166 100644
+LIBEDIT_LIB=@LIBEDIT_LIB@
+LIBEDIT_OBJ=@LIBEDIT_OBJ@
--
-1.7.5.2
+1.7.6.2
diff --git a/0004-Use-the-library-function-for-loading-command-history.patch b/0004-Use-the-library-function-for-loading-command-history.patch
index a42c6aa..69268c7 100644
--- a/0004-Use-the-library-function-for-loading-command-history.patch
+++ b/0004-Use-the-library-function-for-loading-command-history.patch
@@ -1,7 +1,7 @@
-From 7c5e2666702933ae0da9aaac22474d5d89817774 Mon Sep 17 00:00:00 2001
+From d7df9875b514750095d24cb6e169ae57bb73c453 Mon Sep 17 00:00:00 2001
From: "Jeffrey C. Ollie" <jeff at ocjtech.us>
Date: Mon, 8 Mar 2010 12:38:56 -0600
-Subject: [PATCH 4/6] Use the library function for loading command history
+Subject: [PATCH 04/12] Use the library function for loading command history
rather than implementing our own.
---
@@ -9,10 +9,10 @@ Subject: [PATCH 4/6] Use the library function for loading command history
1 files changed, 2 insertions(+), 19 deletions(-)
diff --git a/main/asterisk.c b/main/asterisk.c
-index 1b376e3..535b2cd 100644
+index 2e1af3a..e69feb2 100644
--- a/main/asterisk.c
+++ b/main/asterisk.c
-@@ -2622,29 +2622,12 @@ static int ast_el_write_history(char *filename)
+@@ -2634,29 +2634,12 @@ static int ast_el_write_history(char *filename)
static int ast_el_read_history(char *filename)
{
@@ -45,5 +45,5 @@ index 1b376e3..535b2cd 100644
static void ast_remotecontrol(char *data)
--
-1.7.5.2
+1.7.6.2
diff --git a/0005-Fix-up-some-paths.patch b/0005-Fix-up-some-paths.patch
index 9fc0363..254427c 100644
--- a/0005-Fix-up-some-paths.patch
+++ b/0005-Fix-up-some-paths.patch
@@ -1,7 +1,7 @@
-From 2f19333ec27465a585cced316b92493d65284b51 Mon Sep 17 00:00:00 2001
+From 727299938816d2555db864f557473ea4d77856e4 Mon Sep 17 00:00:00 2001
From: "Jeffrey C. Ollie" <jeff at ocjtech.us>
Date: Wed, 28 Jul 2010 07:27:48 -0500
-Subject: [PATCH 5/6] Fix up some paths
+Subject: [PATCH 05/12] Fix up some paths
---
UPGRADE-1.4.txt | 2 +-
@@ -45,7 +45,7 @@ index e918217..31d5fc2 100644
; Festival command to send to the server.
; Defaults to: (tts_textasterisk "%s" 'file)(quit)\n
diff --git a/configs/http.conf.sample b/configs/http.conf.sample
-index 6f10de7..e956a8f 100644
+index 7893caf..8a5fd9c 100644
--- a/configs/http.conf.sample
+++ b/configs/http.conf.sample
@@ -5,7 +5,7 @@
@@ -57,7 +57,7 @@ index 6f10de7..e956a8f 100644
; HTTP server is enabled in this file by setting the "enabled", "bindaddr",
; and "bindport" options, then you should be able to view the documentation
; remotely by browsing to:
-@@ -69,6 +69,6 @@ bindaddr=127.0.0.1
+@@ -74,6 +74,6 @@ bindaddr=127.0.0.1
;[post_mappings]
;
; In this example, if the prefix option is set to "asterisk", then using the
@@ -513,5 +513,5 @@ index 3c66be2..bedb8d8 100644
exten => 762,1,agi(tts-riddle.agi)
exten => 762,2,Background(gsm/what-time-it-is2)
--
-1.7.5.2
+1.7.6.2
diff --git a/0006-Add-LDAP-schema-that-is-compatible-with-Fedora-Direc.patch b/0006-Add-LDAP-schema-that-is-compatible-with-Fedora-Direc.patch
index aa56990..525b414 100644
--- a/0006-Add-LDAP-schema-that-is-compatible-with-Fedora-Direc.patch
+++ b/0006-Add-LDAP-schema-that-is-compatible-with-Fedora-Direc.patch
@@ -1,8 +1,8 @@
-From bf688f55238e2c4a7db12e9721830d3f7f7e35d6 Mon Sep 17 00:00:00 2001
+From 802da5c86e571b909bd198fc9460ac5230ef4191 Mon Sep 17 00:00:00 2001
From: "Jeffrey C. Ollie" <jeff at ocjtech.us>
Date: Sun, 4 Jan 2009 19:22:39 -0600
-Subject: [PATCH 6/6] Add LDAP schema that is compatible with Fedora Directory
- Server.
+Subject: [PATCH 06/12] Add LDAP schema that is compatible with Fedora
+ Directory Server.
---
contrib/scripts/99asterisk.ldif | 489 +++++++++++++++++++++++++++++++++++++++
@@ -505,5 +505,5 @@ index 0000000..f3bdf4e
+ $ AstConfigVariableName $ AstConfigVariableValue $ AstConfigCommented )
+ )
--
-1.7.5.2
+1.7.6.2
diff --git a/0007-Don-t-load-chan_mgcp-and-res_pktccops-because-res_pk.patch b/0007-Don-t-load-chan_mgcp-and-res_pktccops-because-res_pk.patch
new file mode 100644
index 0000000..ecb43dc
--- /dev/null
+++ b/0007-Don-t-load-chan_mgcp-and-res_pktccops-because-res_pk.patch
@@ -0,0 +1,26 @@
+From f1233019198363c12025f76b710995dfee0e2d38 Mon Sep 17 00:00:00 2001
+From: "Jeffrey C. Ollie" <jeff at ocjtech.us>
+Date: Tue, 20 Sep 2011 08:40:49 -0500
+Subject: [PATCH 07/12] Don't load chan_mgcp and res_pktccops because
+ res_pktccops floods 192.168.0.24 in the default
+ config
+
+---
+ configs/modules.conf.sample | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+diff --git a/configs/modules.conf.sample b/configs/modules.conf.sample
+index 9a1c1c3..3dc2b74 100644
+--- a/configs/modules.conf.sample
++++ b/configs/modules.conf.sample
+@@ -69,3 +69,7 @@ noload => app_voicemail_odbc.so
+ ;
+ ;noload => app_directory_plain.so
+ ;noload => app_voicemail_plain.so
++
++; Don't load chan_mgcp and res_pktccops automatically
++noload => chan_mgcp.so
++noload => res_pktccops.so
+--
+1.7.6.2
+
diff --git a/0008-Make-sure-that-AST_ARGS-is-used-consistently-in-Fedo.patch b/0008-Make-sure-that-AST_ARGS-is-used-consistently-in-Fedo.patch
new file mode 100644
index 0000000..4197082
--- /dev/null
+++ b/0008-Make-sure-that-AST_ARGS-is-used-consistently-in-Fedo.patch
@@ -0,0 +1,63 @@
+From 48a7a760e910ce6afd59e83ca1e01e62876c59cc Mon Sep 17 00:00:00 2001
+From: "Jeffrey C. Ollie" <jeff at ocjtech.us>
+Date: Tue, 20 Sep 2011 09:11:13 -0500
+Subject: [PATCH 08/12] Make sure that AST_ARGS is used consistently in Fedora
+ init script
+
+---
+ contrib/init.d/rc.redhat.asterisk | 20 ++++++++++----------
+ 1 files changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/contrib/init.d/rc.redhat.asterisk b/contrib/init.d/rc.redhat.asterisk
+index 0d53a57..186fc18 100755
+--- a/contrib/init.d/rc.redhat.asterisk
++++ b/contrib/init.d/rc.redhat.asterisk
+@@ -101,35 +101,35 @@ start() {
+ AST_ARGS="$AST_ARGS -G $AST_GROUP"
+ fi
+ if [ $AST_CONFIG ]; then
+- ASTARGS="$ASTARGS -C $AST_CONFIG"
++ AST_ARGS="$AST_ARGS -C $AST_CONFIG"
+ elif [ $ALTCONF ]; then
+- ASTARGS="$ASTARGS -C $ALTCONF"
++ AST_ARGS="$AST_ARGS -C $ALTCONF"
+ fi
+ if [ "x$COREDUMP" = "xyes" ]; then
+- ASTARGS="$ASTARGS -g"
++ AST_ARGS="$AST_ARGS -g"
+ fi
+ if [ "0$MAXLOAD" -gt "0" ]; then
+- ASTARGS="$ASTARGS -L $MAXLOAD"
++ AST_ARGS="$AST_ARGS -L $MAXLOAD"
+ fi
+ if [ "0$MAXCALLS" -gt "0" ]; then
+- ASTARGS="$ASTARGS -M $MAXCALLS"
++ AST_ARGS="$AST_ARGS -M $MAXCALLS"
+ fi
+ if [ "0$VERBOSITY" -gt "0" ]; then
+ for i in `seq 1 $VERBOSITY`; do
+- ASTARGS="$ASTARGS -v"
++ AST_ARGS="$AST_ARGS -v"
+ done
+ fi
+ if [ "x$INTERNALTIMING" = "xyes" ]; then
+- ASTARGS="$ASTARGS -I"
++ AST_ARGS="$AST_ARGS -I"
+ fi
+ if [ "x$TEMPRECORDINGLOCATION" = "xyes" -o "x$TMPRECORDINGLOCATION" = "xyes" ]; then
+- ASTARGS="$ASTARGS -t"
++ AST_ARGS="$AST_ARGS -t"
+ fi
+ if [ "x$COLOR" = "xyes" ]; then
+ export TERM=linux
+- daemon sh -c "$DAEMON $ASTARGS $AST_EXTRA_ARGS -c" >/dev/null </dev/null 2>&1 &
++ daemon sh -c "$DAEMON $AST_ARGS $AST_EXTRA_ARGS -c" >/dev/null </dev/null 2>&1 &
+ else
+- daemon $DAEMON $ASTARGS $AST_EXTRA_ARGS
++ daemon $DAEMON $AST_ARGS $AST_EXTRA_ARGS
+ fi
+ RETVAL=$?
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/asterisk
+--
+1.7.6.2
+
diff --git a/0009-Use-consistently-in-the-Fedora-init-script.patch b/0009-Use-consistently-in-the-Fedora-init-script.patch
new file mode 100644
index 0000000..38425d8
--- /dev/null
+++ b/0009-Use-consistently-in-the-Fedora-init-script.patch
@@ -0,0 +1,25 @@
+From 382a378507925b935b130241bd73d2d7e402c006 Mon Sep 17 00:00:00 2001
+From: "Jeffrey C. Ollie" <jeff at ocjtech.us>
+Date: Tue, 20 Sep 2011 09:12:02 -0500
+Subject: [PATCH 09/12] Use consistently in the Fedora init script
+
+---
+ contrib/init.d/rc.redhat.asterisk | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/contrib/init.d/rc.redhat.asterisk b/contrib/init.d/rc.redhat.asterisk
+index 186fc18..7415138 100755
+--- a/contrib/init.d/rc.redhat.asterisk
++++ b/contrib/init.d/rc.redhat.asterisk
+@@ -82,7 +82,7 @@ RETVAL=0
+ start() {
+ # Check if Asterisk is already running. If it is, then bug out, because
+ # starting safe_asterisk when Asterisk is running is very bad.
+- VERSION=`${AST_SBIN}/asterisk -rx 'core show version'`
++ VERSION=`$DAEMON -rx 'core show version'`
+ if [ "`echo $VERSION | cut -c 1-8`" = "Asterisk" ]; then
+ echo "Asterisk is already running."
+ exit 1
+--
+1.7.6.2
+
diff --git a/0010-Make-sure-that-the-Fedora-init-script-can-find-the-p.patch b/0010-Make-sure-that-the-Fedora-init-script-can-find-the-p.patch
new file mode 100644
index 0000000..8517594
--- /dev/null
+++ b/0010-Make-sure-that-the-Fedora-init-script-can-find-the-p.patch
@@ -0,0 +1,27 @@
+From 6a57b68b22473802e2a5d133ba24fd8f24f4be20 Mon Sep 17 00:00:00 2001
+From: "Jeffrey C. Ollie" <jeff at ocjtech.us>
+Date: Tue, 20 Sep 2011 09:12:57 -0500
+Subject: [PATCH 10/12] Make sure that the Fedora init script can find the pid
+ file.
+
+---
+ contrib/init.d/rc.redhat.asterisk | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/contrib/init.d/rc.redhat.asterisk b/contrib/init.d/rc.redhat.asterisk
+index 7415138..95e83ef 100755
+--- a/contrib/init.d/rc.redhat.asterisk
++++ b/contrib/init.d/rc.redhat.asterisk
+@@ -140,7 +140,8 @@ start() {
+ stop() {
+ # Stop daemon.
+ echo -n $"Stopping asterisk: "
+- killproc `basename $DAEMON`
++ piddir=`awk '$1 == "astrundir" { print $3 }' $AST_CONFIG`
++ killproc -p $piddir/asterisk.pid `basename $DAEMON`
+ RETVAL=$?
+ [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/asterisk
+ echo
+--
+1.7.6.2
+
diff --git a/0011-This-fixes-the-inotify-code-to-handle-call-files-bei.patch b/0011-This-fixes-the-inotify-code-to-handle-call-files-bei.patch
new file mode 100644
index 0000000..07d5d36
--- /dev/null
+++ b/0011-This-fixes-the-inotify-code-to-handle-call-files-bei.patch
@@ -0,0 +1,136 @@
+From 7ee9833fa5ad62c5ce3584d9ff3262a7731796b8 Mon Sep 17 00:00:00 2001
+From: David Woodhouse <dwmw2 at infradead.org>
+Date: Tue, 20 Sep 2011 09:19:22 -0500
+Subject: [PATCH 11/12] This fixes the inotify code to handle call files being
+ hardlinked into the spool directory.
+
+The smsq utility does this, instead of rename(), to ensure that it
+cannot accidentally overwrite an existing spool file. A rename() might
+do that, but link() will definitely not.
+
+The inotify code had broken this, because it would wait for an
+IN_CLOSE_WRITE event on the file... which was never forthcoming, since
+it was never opened. Now we look for IN_OPEN events following the
+IN_CREATE event, and only wait for an IN_CLOSE_WRITE if the file was
+actually opened.
+---
+ pbx/pbx_spool.c | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
+ 1 files changed, 58 insertions(+), 2 deletions(-)
+
+diff --git a/pbx/pbx_spool.c b/pbx/pbx_spool.c
+index d13b539..40d2a6d 100644
+--- a/pbx/pbx_spool.c
++++ b/pbx/pbx_spool.c
+@@ -464,6 +464,7 @@ static AST_LIST_HEAD_STATIC(dirlist, direntry);
+ #if defined(HAVE_INOTIFY)
+ /* Only one thread is accessing this list, so no lock is necessary */
+ static AST_LIST_HEAD_NOLOCK_STATIC(createlist, direntry);
++static AST_LIST_HEAD_NOLOCK_STATIC(openlist, direntry);
+ #endif
+
+ static void queue_file(const char *filename, time_t when)
+@@ -544,14 +545,47 @@ static void queue_file_create(const char *filename)
+ return;
+ }
+ strcpy(cur->name, filename);
++ /* We'll handle this file unless an IN_OPEN event occurs within 2 seconds */
++ cur->mtime = time(NULL) + 2;
+ AST_LIST_INSERT_TAIL(&createlist, cur, list);
+ }
+
++static void queue_file_open(const char *filename)
++{
++ struct direntry *cur;
++
++ AST_LIST_TRAVERSE_SAFE_BEGIN(&createlist, cur, list) {
++ if (!strcmp(cur->name, filename)) {
++ AST_LIST_REMOVE_CURRENT(list);
++ AST_LIST_INSERT_TAIL(&openlist, cur, list);
++ break;
++ }
++ }
++ AST_LIST_TRAVERSE_SAFE_END
++}
++
++static void queue_created_files(void)
++{
++ struct direntry *cur;
++ time_t now = time(NULL);
++
++ AST_LIST_TRAVERSE_SAFE_BEGIN(&createlist, cur, list) {
++ if (cur->mtime > now) {
++ break;
++ }
++
++ AST_LIST_REMOVE_CURRENT(list);
++ queue_file(cur->name, 0);
++ ast_free(cur);
++ }
++ AST_LIST_TRAVERSE_SAFE_END
++}
++
+ static void queue_file_write(const char *filename)
+ {
+ struct direntry *cur;
+ /* Only queue entries where an IN_CREATE preceded the IN_CLOSE_WRITE */
+- AST_LIST_TRAVERSE_SAFE_BEGIN(&createlist, cur, list) {
++ AST_LIST_TRAVERSE_SAFE_BEGIN(&openlist, cur, list) {
+ if (!strcmp(cur->name, filename)) {
+ AST_LIST_REMOVE_CURRENT(list);
+ ast_free(cur);
+@@ -598,7 +632,7 @@ static void *scan_thread(void *unused)
+ }
+
+ #ifdef HAVE_INOTIFY
+- inotify_add_watch(inotify_fd, qdir, IN_CREATE | IN_CLOSE_WRITE | IN_MOVED_TO);
++ inotify_add_watch(inotify_fd, qdir, IN_CREATE | IN_OPEN | IN_CLOSE_WRITE | IN_MOVED_TO);
+ #endif
+
+ /* First, run through the directory and clear existing entries */
+@@ -634,14 +668,35 @@ static void *scan_thread(void *unused)
+ /* Convert from seconds to milliseconds, unless there's nothing
+ * in the queue already, in which case, we wait forever. */
+ int waittime = next == INT_MAX ? -1 : (next - now) * 1000;
++ if (!AST_LIST_EMPTY(&createlist)) {
++ waittime = 1000;
++ }
+ /* When a file arrives, add it to the queue, in mtime order. */
+ if ((res = poll(&pfd, 1, waittime)) > 0 && (stage = 1) &&
+ (res = read(inotify_fd, &buf, sizeof(buf))) >= sizeof(*iev)) {
+ ssize_t len = 0;
+ /* File(s) added to directory, add them to my list */
+ for (iev = (void *) buf; res >= sizeof(*iev); iev = (struct inotify_event *) (((char *) iev) + len)) {
++ /* For an IN_MOVED_TO event, simply process the file. However, if
++ * we get an IN_CREATE event it *might* be an open(O_CREAT) or it
++ * might be a hardlink (like smsq does, since rename() might
++ * overwrite an existing file). So we have to see if we get a
++ * subsequent IN_OPEN event on the same file. If we do, keep it
++ * on the openlist and wait for the corresponding IN_CLOSE_WRITE.
++ * If we *don't* see an IN_OPEN event, then it was a hard link so
++ * it can be processed immediately.
++ *
++ * Unfortunately, although open(O_CREAT) is an atomic file system
++ * operation, the inotify subsystem doesn't give it to us in a
++ * single event with both IN_CREATE|IN_OPEN set. It's two separate
++ * events, and the kernel doesn't even give them to us at the same
++ * time. We can read() from inotify_fd after the IN_CREATE event,
++ * and get *nothing* from it. The IN_OPEN arrives only later! So
++ * we have a very short timeout of 2 seconds. */
+ if (iev->mask & IN_CREATE) {
+ queue_file_create(iev->name);
++ } else if (iev->mask & IN_OPEN) {
++ queue_file_open(iev->name);
+ } else if (iev->mask & IN_CLOSE_WRITE) {
+ queue_file_write(iev->name);
+ } else if (iev->mask & IN_MOVED_TO) {
+@@ -672,6 +727,7 @@ static void *scan_thread(void *unused)
+ time(&now);
+ }
+
++ queue_created_files();
+ /* Empty the list of all entries ready to be processed */
+ AST_LIST_LOCK(&dirlist);
+ while (!AST_LIST_EMPTY(&dirlist) && AST_LIST_FIRST(&dirlist)->mtime <= now) {
+--
+1.7.6.2
+
diff --git a/0012-Fix-two-problems-with-app_sms.patch b/0012-Fix-two-problems-with-app_sms.patch
new file mode 100644
index 0000000..ac84b44
--- /dev/null
+++ b/0012-Fix-two-problems-with-app_sms.patch
@@ -0,0 +1,64 @@
+From 4401cf3bcf07723bf30724f76074942eb7aaa7be Mon Sep 17 00:00:00 2001
+From: David Woodhouse <dwmw2 at infradead.org>
+Date: Tue, 20 Sep 2011 09:21:47 -0500
+Subject: [PATCH 12/12] Fix two problems with app_sms.
+
+Firstly, the 'flags' field on the stack in sms_exec() is
+uninitialised, causing it to use the wrong protocol in some cases.
+
+Secondly, when disconnect supervision is not working or
+inbanddisconnect=yes is set in chan_dahdi.conf, app_sms was failing to
+terminate the call after it sent the REL(ease) message and the peer
+stopped talking to it. This patch fixes the code to handle the 'bad
+stop bit' message more gracefully in that case, and hang up the call.
+---
+ apps/app_sms.c | 12 +++++++++---
+ 1 files changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/apps/app_sms.c b/apps/app_sms.c
+index 7c13147..120dce5 100644
+--- a/apps/app_sms.c
++++ b/apps/app_sms.c
+@@ -216,6 +216,7 @@ static const unsigned short escapes[] = {
+ typedef struct sms_s {
+ unsigned char hangup; /*!< we are done... */
+ unsigned char err; /*!< set for any errors */
++ unsigned char sent_rel:1; /*!< have sent REL message... */
+ unsigned char smsc:1; /*!< we are SMSC */
+ unsigned char rx:1; /*!< this is a received message */
+ char queue[30]; /*!< queue name */
+@@ -1464,6 +1465,7 @@ static void sms_nextoutgoing (sms_t * h)
+ } else {
+ h->omsg[0] = 0x94; /* SMS_REL */
+ h->omsg[1] = 0;
++ h->sent_rel = 1;
+ }
+ }
+ sms_messagetx(h);
+@@ -1801,8 +1803,12 @@ static void sms_process(sms_t * h, int samples, signed short *data)
+ h->iphasep -= 80;
+ if (h->ibitn++ == 9) { /* end of byte */
+ if (!bit) { /* bad stop bit */
+- ast_log(LOG_NOTICE, "bad stop bit");
+- h->ierr = 0xFF; /* unknown error */
++ if (h->sent_rel) {
++ h->hangup = 1;
++ } else {
++ ast_log(LOG_NOTICE, "bad stop bit\n");
++ h->ierr = 0xFF; /* unknown error */
++ }
+ } else {
+ if (h->ibytep < sizeof(h->imsg)) {
+ h->imsg[h->ibytep] = h->ibytev;
+@@ -1864,7 +1870,7 @@ static int sms_exec(struct ast_channel *chan, const char *data)
+ int res = -1;
+ sms_t h = { 0 };
+ /* argument parsing support */
+- struct ast_flags flags;
++ struct ast_flags flags = { 0 };
+ char *parse, *sms_opts[OPTION_ARG_ARRAY_SIZE] = { 0, };
+ char *p;
+ AST_DECLARE_APP_ARGS(sms_args,
+--
+1.7.6.2
+
diff --git a/asterisk.spec b/asterisk.spec
index 83fd8b7..2563d0b 100644
--- a/asterisk.spec
+++ b/asterisk.spec
@@ -1,4 +1,4 @@
-%global _rc 2
+#global _rc 2
#global _beta 5
%if 0%{?fedora} >= 15
@@ -18,7 +18,7 @@
Summary: The Open Source PBX
Name: asterisk
Version: 1.8.6.0
-Release: 0.2%{?_rc:.rc%{_rc}}%{?_beta:.beta%{_beta}}%{?dist}
+Release: 2%{?_rc:.rc%{_rc}}%{?_beta:.beta%{_beta}}%{?dist}
License: GPLv2
Group: Applications/Internet
URL: http://www.asterisk.org/
@@ -38,6 +38,13 @@ Patch3: 0003-Allow-linking-building-against-an-external-libedit.patch
Patch4: 0004-Use-the-library-function-for-loading-command-history.patch
Patch5: 0005-Fix-up-some-paths.patch
Patch6: 0006-Add-LDAP-schema-that-is-compatible-with-Fedora-Direc.patch
+Patch7: 0007-Don-t-load-chan_mgcp-and-res_pktccops-because-res_pk.patch
+Patch8: 0008-Make-sure-that-AST_ARGS-is-used-consistently-in-Fedo.patch
+Patch9: 0009-Use-consistently-in-the-Fedora-init-script.patch
+Patch10: 0010-Make-sure-that-the-Fedora-init-script-can-find-the-p.patch
+# Submitted upstream: https://issues.asterisk.org/jira/browse/ASTERISK-18331
+Patch11: 0011-This-fixes-the-inotify-code-to-handle-call-files-bei.patch
+Patch12: 0012-Fix-two-problems-with-app_sms.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n)
@@ -466,6 +473,12 @@ local filesystem.
%patch4 -p1
%patch5 -p1
%patch6 -p1
+%patch7 -p1
+%patch8 -p1
+%patch9 -p1
+%patch10 -p1
+%patch11 -p1
+%patch12 -p1
cp %{S:3} menuselect.makedeps
cp %{S:4} menuselect.makeopts
@@ -1252,6 +1265,56 @@ fi
%{_libdir}/asterisk/modules/app_voicemail_plain.so
%changelog
+* Tue Sep 20 2011 Jeffrey C. Ollie <jeff at ocjtech.us> - 1.8.6.0-2
+- Add patches to fix many bug reports from bugzilla.
+
+* Tue Sep 20 2011 Jeffrey C. Ollie <jeff at ocjtech.us> - 1.8.6.0-1
+- The Asterisk Development Team announces the release of Asterisk 1.8.6.0. This
+- release is available for immediate download at
+- http://downloads.asterisk.org/pub/telephony/asterisk/
+-
+- The release of Asterisk 1.8.6.0 resolves several issues reported by the
+- community and would have not been possible without your participation.
+- Thank you!
+-
+- The following is a sample of the issues resolved in this release:
+-
+- * Fix an issue with Music on Hold classes losing files in playlist when realtime
+- is used.
+- (Closes issue ASTERISK-17875. Reported by David Cunningham. Patched by Igor
+- Goncharovsky)
+-
+- * Resolve a potential crash in chan_sip when utilizing auth= and performing a
+- 'sip reload' from the console.
+- (Closes issue ASTERISK-17939. Reported by wdoekes. Patched by Richard Mudgett)
+-
+- * Address some improper sql statements in res_odbc that would cause an update
+- to fail on realtime peers due to trying to set as "(NULL)" rather than an
+- actual NULL.
+- (Closes issue ASTERISK-17791. Reported by marcelloceschia. Patched by Tilghman
+- Lesher)
+-
+- * Resolve issue where 403 Forbidden would always be sent maximum number of times
+- regardless to receipt of ACK.
+- (Patched by Richard Mudgett)
+-
+- * Resolve issue where if a call to MeetMe includes both the dynamic(D) and
+- always request PIN(P) options, MeetMe will ask for the PIN two times: once for
+- creating the conference and once for entering the conference.
+- (Patched by Kinsey Moore)
+-
+- * Fix New Zealand indications profile based on
+- http://www.telepermit.co.nz/TNA102.pdf
+- (Closes issue ASTERISK-16263. Reported, Patched by richardf)
+-
+- * Segfault in shell_helper in func_shell.c
+- (Closes issue ASTERISK-18109. Reported by Michael Myles, patched by Richard
+- Mudgett)
+-
+- For a full list of changes in this release, please see the ChangeLog:
+-
+- http://downloads.asterisk.org/pub/telephony/asterisk/ChangeLog-1.8.6.0
+
* Tue Aug 23 2011 Jeffrey C. Ollie <jeff at ocjtech.us> - 1.8.6.0-0.2.rc2
- The Asterisk Development Team has announced the second release candidate of
- Asterisk 1.8.6.0. This release candidate is available for immediate download at
diff --git a/sources b/sources
index 25291b8..9e883e1 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-f835fd23eec85ef6c72d00995e61e2c3 asterisk-1.8.6.0-rc2.tar.gz
-5a7c7145257a12d37ec22ae6fedc71c4 asterisk-1.8.6.0-rc2.tar.gz.asc
+58f1635d1f9b851717c3fec9e67b5da7 asterisk-1.8.6.0.tar.gz
+7002c5cad6d0684065d060d2350688e9 asterisk-1.8.6.0.tar.gz.asc
More information about the scm-commits
mailing list