aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlmadsen <lmadsen@f38db490-d61c-443f-a65b-d21fe96a405b>2010-06-09 17:55:11 +0000
committerlmadsen <lmadsen@f38db490-d61c-443f-a65b-d21fe96a405b>2010-06-09 17:55:11 +0000
commitbebfb7c8bb1626acbcff40f71a49ec847da8e59b (patch)
treed8285efab311e5e42c3352cc84a39b5a64d1c28e
parentda93e2190bc01ea661fcaf0c855f710c736c5ba9 (diff)
Merge in revision 269335. Updated ChangeLog and .version files.
git-svn-id: http://svn.digium.com/svn/asterisk/tags/1.4.33-rc2@269350 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--.version2
-rw-r--r--ChangeLog18
-rwxr-xr-xcontrib/init.d/rc.debian.asterisk24
-rw-r--r--main/term.c22
4 files changed, 46 insertions, 20 deletions
diff --git a/.version b/.version
index b21c0e844..597d4901d 100644
--- a/.version
+++ b/.version
@@ -1 +1 @@
-1.4.33-rc1
+1.4.33-rc2
diff --git a/ChangeLog b/ChangeLog
index 75aa16451..017c98cdb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2010-06-09 Leif Madsen <lmadsen@digium.com>
+
+ * Asterisk 1.4.33-rc2 Released.
+
+2010-06-09 Paul Belanger <paul.belanger@polybeacon.com>
+
+ * Fix Debian init script to not use -c.
+
+ When using the init script as-is currently, it could cause issues on Debian
+ such as high CPU usage. This fix has worked for several people so I'm
+ implementing the change. We now handle color displays properly.
+
+ (closes issue 0016784)
+ Reported by: pabelanger
+ Patches:
+ 20100530__issue16784__2.diff.txt uploaded by tilghman (license 14)
+ Tested by: pabelanger, tilghman
+
2010-06-01 Leif Madsen <lmadsen@digium.com>
* Asterisk 1.4.33-rc1 Released.
diff --git a/contrib/init.d/rc.debian.asterisk b/contrib/init.d/rc.debian.asterisk
index 1742d5001..93933f9e1 100755
--- a/contrib/init.d/rc.debian.asterisk
+++ b/contrib/init.d/rc.debian.asterisk
@@ -51,7 +51,7 @@ if ! [ -d /etc/asterisk ] ; then
exit 0
fi
-# Use the LSB standar functions for services management
+# Use the LSB standard functions for services management
. /lib/lsb/init-functions
case "$1" in
@@ -65,19 +65,17 @@ case "$1" in
fi
log_begin_msg "Starting $DESC: $NAME"
- if [ $AST_USER ] ; then
- ASTARGS="-U $AST_USER"
- fi
- if [ $AST_GROUP ] ; then
- ASTARGS="$ASTARGS -G $AST_GROUP"
- fi
- # "start-stop-daemon --oknodo" returns 0 even if Asterisk was already running (as LSB expects):
- if test "x$COLOR" = "xyes" ; then
- export TERM=linux
- start-stop-daemon --start --oknodo --background --exec $DAEMON -- $ASTARGS -c
- else
- start-stop-daemon --start --oknodo --exec $DAEMON -- $ASTARGS
+ if [ $AST_USER ] ; then
+ ASTARGS="-U $AST_USER"
+ fi
+ if [ $AST_GROUP ] ; then
+ ASTARGS="$ASTARGS -G $AST_GROUP"
fi
+ if test "x$COLOR" = "xno" ; then
+ ASTARGS="$ASTARGS -n"
+ fi
+ # "start-stop-daemon --oknodo" returns 0 even if Asterisk was already running (as LSB expects):
+ start-stop-daemon --start --oknodo --exec $DAEMON -- $ASTARGS
log_end_msg $?
;;
stop)
diff --git a/main/term.c b/main/term.c
index d051338d8..265be1fdb 100644
--- a/main/term.c
+++ b/main/term.c
@@ -1,7 +1,7 @@
/*
* Asterisk -- An open source telephony toolkit.
*
- * Copyright (C) 1999 - 2005, Digium, Inc.
+ * Copyright (C) 1999 - 2010, Digium, Inc.
*
* Mark Spencer <markster@digium.com>
*
@@ -18,9 +18,9 @@
/*! \file
*
- * \brief Terminal Routines
+ * \brief Terminal Routines
*
- * \author Mark Spencer <markster@digium.com>
+ * \author Mark Spencer <markster@digium.com>
*/
#include "asterisk.h"
@@ -79,12 +79,21 @@ int ast_term_init(void)
char buffer[512] = "";
int termfd = -1, parseokay = 0, i;
- if (!term)
+ if (ast_opt_no_color) {
return 0;
- if (!ast_opt_console || ast_opt_no_color || !ast_opt_no_fork)
+ }
+
+ if (!ast_opt_console) {
+ /* If any remote console is not compatible, we'll strip the color codes at that point */
+ vt100compat = 1;
+ goto end;
+ }
+
+ if (!term) {
return 0;
+ }
- for (i=0 ;; i++) {
+ for (i = 0;; i++) {
if (termpath[i] == NULL) {
break;
}
@@ -138,6 +147,7 @@ int ast_term_init(void)
}
}
+end:
if (vt100compat) {
/* Make commands show up in nice colors */
snprintf(prepdata, sizeof(prepdata), "%c[%d;%d;%dm", ESC, ATTR_BRIGHT, COLOR_BROWN, COLOR_BLACK + 10);