[asterisk-commits] qwell: branch qwell/codec_consistency_fix r147586 - in /team/qwell/codec_cons...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Oct 8 12:29:45 CDT 2008


Author: qwell
Date: Wed Oct  8 12:29:45 2008
New Revision: 147586

URL: http://svn.digium.com/view/asterisk?view=rev&rev=147586
Log:
Merged revisions 147146,147191-147192,147194,147262,147264-147266,147306,147312,147347,147388,147456-147457,147476,147518 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
  r147146 | jpeeler | 2008-10-07 11:04:45 -0500 (Tue, 07 Oct 2008) | 3 lines
  
  Explicitly setting these fields to NULL was done because I wasn't sure if they would be NULL otherwise. Since they will be set automatically, removing.
................
  r147191 | seanbright | 2008-10-07 11:40:24 -0500 (Tue, 07 Oct 2008) | 4 lines
  
  There was a boo-boo in TFOT that is causing some confusion on the mailing lists
  so include 'imapsecret' as an alias to 'imappassword' (and print a little notice
  nudging users toward the right option name).
................
  r147192 | seanbright | 2008-10-07 11:44:00 -0500 (Tue, 07 Oct 2008) | 2 lines
  
  Or not.
................
  r147194 | seanbright | 2008-10-07 11:52:02 -0500 (Tue, 07 Oct 2008) | 10 lines
  
  Merged revisions 147193 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
  r147193 | seanbright | 2008-10-07 12:48:30 -0400 (Tue, 07 Oct 2008) | 2 lines
  
  Make 'imapsecret' an alias to 'imappassword' in voicemail.conf.
  
  ........
................
  r147262 | tilghman | 2008-10-07 12:44:32 -0500 (Tue, 07 Oct 2008) | 3 lines
  
  Allow people to select the old console behavior of white text on a black
  background, by using the startup flag '-B'.
................
  r147264 | mvanbaak | 2008-10-07 12:49:23 -0500 (Tue, 07 Oct 2008) | 2 lines
  
  fix wording as pointed out by Corydon
................
  r147265 | seanbright | 2008-10-07 13:00:14 -0500 (Tue, 07 Oct 2008) | 4 lines
  
  This was flawed.  The issue that I was trying to address was addressed by
  adding the imapsecret alias for imappassword.  Will rethink this one and
  give it another shot on a rainy day TBD.
................
  r147266 | mvanbaak | 2008-10-07 13:00:48 -0500 (Tue, 07 Oct 2008) | 2 lines
  
  use pkill instead of killall to be more portable
................
  r147306 | mvanbaak | 2008-10-07 13:53:34 -0500 (Tue, 07 Oct 2008) | 5 lines
  
  Make sure the configs on OpenBSD are in /etc/asterisk by default
  
  (closes issue #13641)
  Reported by: jtodd
................
  r147312 | mvanbaak | 2008-10-07 14:26:09 -0500 (Tue, 07 Oct 2008) | 2 lines
  
  make this work on OpenBSD
................
  r147347 | mvanbaak | 2008-10-07 15:15:27 -0500 (Tue, 07 Oct 2008) | 9 lines
  
  Make format_vorbis_ogg compile on OpenBSD
  
  (closes issue #13639)
  Reported by: mvanbaak
  Patches:
        2008100700_oggsupportOBSD.diff.txt uploaded by mvanbaak (license 7)
        2008100700_oggsupportOBSD-configurescript.diff.txt uploaded by mvanbaak (license 7)
  Tested by: mvanbaak
................
  r147388 | seanbright | 2008-10-07 16:34:44 -0500 (Tue, 07 Oct 2008) | 9 lines
  
  Move the DAHDI-to-DAHDI operator mode check from app_dial into chan_dahdi
  so we don't have to hardcode anything.
  
  (closes issue #13636)
  Reported by: seanbright
  Patches:
        13636.diff uploaded by seanbright (license 71)
  Reviewed by: russellb, putnopvut
................
  r147456 | seanbright | 2008-10-08 07:07:19 -0500 (Wed, 08 Oct 2008) | 1 line
  
  When echoing our copies, strip off ASTTOPDIR from the front of the source file.
................
  r147457 | seanbright | 2008-10-08 07:15:06 -0500 (Wed, 08 Oct 2008) | 2 lines
  
  Keep up with shadow warnings.  One day I'll actually enable this in the Makefile.
................
  r147476 | snuffy | 2008-10-08 07:28:43 -0500 (Wed, 08 Oct 2008) | 2 lines
  
  Adjust commented default trunkmtu value to match documentation above it
................
  r147518 | file | 2008-10-08 09:53:51 -0500 (Wed, 08 Oct 2008) | 9 lines
  
  Merged revisions 147517 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r147517 | file | 2008-10-08 11:51:42 -0300 (Wed, 08 Oct 2008) | 2 lines
    
    If we receive DTMF make sure that the state of the speech structure goes back to being not ready. (issue #LUMENVOX-8)
  ........
................

Modified:
    team/qwell/codec_consistency_fix/   (props changed)
    team/qwell/codec_consistency_fix/CHANGES
    team/qwell/codec_consistency_fix/UPGRADE.txt
    team/qwell/codec_consistency_fix/apps/app_dial.c
    team/qwell/codec_consistency_fix/apps/app_meetme.c
    team/qwell/codec_consistency_fix/apps/app_speech_utils.c
    team/qwell/codec_consistency_fix/apps/app_voicemail.c
    team/qwell/codec_consistency_fix/cdr/cdr_adaptive_odbc.c
    team/qwell/codec_consistency_fix/channels/Makefile
    team/qwell/codec_consistency_fix/channels/chan_dahdi.c
    team/qwell/codec_consistency_fix/channels/chan_iax2.c
    team/qwell/codec_consistency_fix/configs/iax.conf.sample
    team/qwell/codec_consistency_fix/configure
    team/qwell/codec_consistency_fix/configure.ac
    team/qwell/codec_consistency_fix/contrib/scripts/safe_asterisk
    team/qwell/codec_consistency_fix/contrib/scripts/safe_asterisk_restart
    team/qwell/codec_consistency_fix/funcs/func_curl.c
    team/qwell/codec_consistency_fix/include/asterisk/options.h
    team/qwell/codec_consistency_fix/main/asterisk.c
    team/qwell/codec_consistency_fix/main/features.c
    team/qwell/codec_consistency_fix/main/term.c
    team/qwell/codec_consistency_fix/res/res_odbc.c
    team/qwell/codec_consistency_fix/utils/Makefile

Propchange: team/qwell/codec_consistency_fix/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Propchange: team/qwell/codec_consistency_fix/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Oct  8 12:29:45 2008
@@ -1,1 +1,1 @@
-/trunk:1-147100
+/trunk:1-147585

Modified: team/qwell/codec_consistency_fix/CHANGES
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/CHANGES?view=diff&rev=147586&r1=147585&r2=147586
==============================================================================
--- team/qwell/codec_consistency_fix/CHANGES (original)
+++ team/qwell/codec_consistency_fix/CHANGES Wed Oct  8 12:29:45 2008
@@ -352,7 +352,7 @@
     driver is.
   * Added 'skinny show lines verbose' CLI command. This will show the subs for every channel.
   * Cleanup another bunch of CLI commands. Now all modules follow the same schema.
-    (Done by lmadsen, junky and mvanbaak during the AstriDevCon)
+    (Done by lmadsen, junky and mvanbaak during the devcon 2008)
 
 SIP changes
 -----------

Modified: team/qwell/codec_consistency_fix/UPGRADE.txt
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/UPGRADE.txt?view=diff&rev=147586&r1=147585&r2=147586
==============================================================================
--- team/qwell/codec_consistency_fix/UPGRADE.txt (original)
+++ team/qwell/codec_consistency_fix/UPGRADE.txt Wed Oct  8 12:29:45 2008
@@ -77,6 +77,13 @@
   had any significance).  Since this violates the Principle of Least Surprise,
   it has been changed.
 
+* The default console now will use colors according to the default background
+  color, instead of forcing the background color to black.  If you are using a
+  light colored background for your console, you may wish to use the option
+  flag '-W' to present better color choices for the various messages.  However,
+  if you'd prefer the old method of forcing colors to white text on a black
+  background, the compatiblity option -B is provided for this purpose.
+
 Voicemail:
 
 * The voicemail configuration values 'maxmessage' and 'minmessage' have

Modified: team/qwell/codec_consistency_fix/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/apps/app_dial.c?view=diff&rev=147586&r1=147585&r2=147586
==============================================================================
--- team/qwell/codec_consistency_fix/apps/app_dial.c (original)
+++ team/qwell/codec_consistency_fix/apps/app_dial.c Wed Oct  8 12:29:45 2008
@@ -1926,11 +1926,7 @@
 				res = -1;
 				goto done;
 			}
-			if (opermode && !strncmp(chan->tech->type, "DAHDI", 5) && !strncmp(peer->name, "DAHDI", 5)) {
-				/* what's this special handling for dahdi <-> dahdi ?
-				 * A: dahdi to dahdi calls are natively bridged at the kernel driver
-				 * level, so we need to ensure that this mode gets propagated
-				 * all the way down. */
+			if (opermode) {
 				struct oprmode oprmode;
 
 				oprmode.peer = peer;

Modified: team/qwell/codec_consistency_fix/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/apps/app_meetme.c?view=diff&rev=147586&r1=147585&r2=147586
==============================================================================
--- team/qwell/codec_consistency_fix/apps/app_meetme.c (original)
+++ team/qwell/codec_consistency_fix/apps/app_meetme.c Wed Oct  8 12:29:45 2008
@@ -2157,9 +2157,9 @@
 
 						for ( ; var; var = var->next) {
 							if (!strcasecmp(var->name, "endtime")) {
-								struct ast_tm tm;
-								ast_strptime(var->value, "%Y-%m-%d %H:%M:%S", &tm);
-								tmp = ast_mktime(&tm, NULL);
+								struct ast_tm endtime_tm;
+								ast_strptime(var->value, "%Y-%m-%d %H:%M:%S", &endtime_tm);
+								tmp = ast_mktime(&endtime_tm, NULL);
 								localendtime = tmp.tv_sec;
 							}
 						}
@@ -3057,9 +3057,9 @@
 			} else if (!strcasecmp(var->name, "adminopts")) {
 				ast_copy_string(adminopts, var->value, sizeof(char[OPTIONS_LEN]));
 			} else if (!strcasecmp(var->name, "endtime")) {
-				struct ast_tm tm;
-				ast_strptime(var->value, "%Y-%m-%d %H:%M:%S", &tm);
-				endtime = ast_mktime(&tm, NULL);
+				struct ast_tm endtime_tm;
+				ast_strptime(var->value, "%Y-%m-%d %H:%M:%S", &endtime_tm);
+				endtime = ast_mktime(&endtime_tm, NULL);
 			}
 		}
 

Modified: team/qwell/codec_consistency_fix/apps/app_speech_utils.c
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/apps/app_speech_utils.c?view=diff&rev=147586&r1=147585&r2=147586
==============================================================================
--- team/qwell/codec_consistency_fix/apps/app_speech_utils.c (original)
+++ team/qwell/codec_consistency_fix/apps/app_speech_utils.c Wed Oct  8 12:29:45 2008
@@ -743,6 +743,7 @@
 			speech->results->text = ast_strdup(dtmf);
 			speech->results->grammar = ast_strdup("dtmf");
 		}
+		ast_speech_change_state(speech, AST_SPEECH_STATE_NOT_READY);
 	}
 
 	/* See if it was because they hung up */

Modified: team/qwell/codec_consistency_fix/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/apps/app_voicemail.c?view=diff&rev=147586&r1=147585&r2=147586
==============================================================================
--- team/qwell/codec_consistency_fix/apps/app_voicemail.c (original)
+++ team/qwell/codec_consistency_fix/apps/app_voicemail.c Wed Oct  8 12:29:45 2008
@@ -773,7 +773,7 @@
 #ifdef IMAP_STORAGE
 	} else if (!strcasecmp(var, "imapuser")) {
 		ast_copy_string(vmu->imapuser, value, sizeof(vmu->imapuser));
-	} else if (!strcasecmp(var, "imappassword")) {
+	} else if (!strcasecmp(var, "imappassword") || !strcasecmp(var, "imapsecret")) {
 		ast_copy_string(vmu->imappassword, value, sizeof(vmu->imappassword));
 #endif
 	} else if (!strcasecmp(var, "delete") || !strcasecmp(var, "deletevoicemail")) {
@@ -849,8 +849,6 @@
 		sscanf(value, "%lf", &vmu->volgain);
 	} else if (!strcasecmp(var, "options")) {
 		apply_options(vmu, value);
-	} else {
-		ast_log(LOG_WARNING, "Unknown option '%s' specified for mailbox '%s'.\n", var, vmu->mailbox);
 	}
 }
 
@@ -1007,7 +1005,7 @@
 #ifdef IMAP_STORAGE
 		} else if (!strcasecmp(tmp->name, "imapuser")) {
 			ast_copy_string(retval->imapuser, tmp->value, sizeof(retval->imapuser));
-		} else if (!strcasecmp(tmp->name, "imappassword")) {
+		} else if (!strcasecmp(tmp->name, "imappassword") || !strcasecmp(tmp->name, "imapsecret")) {
 			ast_copy_string(retval->imappassword, tmp->value, sizeof(retval->imappassword));
 #endif
 		} else

Modified: team/qwell/codec_consistency_fix/cdr/cdr_adaptive_odbc.c
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/cdr/cdr_adaptive_odbc.c?view=diff&rev=147586&r1=147585&r2=147586
==============================================================================
--- team/qwell/codec_consistency_fix/cdr/cdr_adaptive_odbc.c (original)
+++ team/qwell/codec_consistency_fix/cdr/cdr_adaptive_odbc.c Wed Oct  8 12:29:45 2008
@@ -373,9 +373,9 @@
 
 			/* Check if we have a similarly named variable */
 			if (datefield && tableptr->usegmtime) {
-				struct timeval tv = (datefield == 1) ? cdr->start : (datefield == 2) ? cdr->answer : cdr->end;
+				struct timeval date_tv = (datefield == 1) ? cdr->start : (datefield == 2) ? cdr->answer : cdr->end;
 				struct ast_tm tm = { 0, };
-				ast_localtime(&tv, &tm, "UTC");
+				ast_localtime(&date_tv, &tm, "UTC");
 				ast_strftime(colbuf, sizeof(colbuf), "%Y-%m-%d %H:%M:%S", &tm);
 			} else {
 				ast_cdr_getvar(cdr, entry->cdrname, &colptr, colbuf, sizeof(colbuf), 0, datefield ? 0 : 1);

Modified: team/qwell/codec_consistency_fix/channels/Makefile
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/channels/Makefile?view=diff&rev=147586&r1=147585&r2=147586
==============================================================================
--- team/qwell/codec_consistency_fix/channels/Makefile (original)
+++ team/qwell/codec_consistency_fix/channels/Makefile Wed Oct  8 12:29:45 2008
@@ -16,8 +16,8 @@
 MENUSELECT_DESCRIPTION=Channel Drivers
 
 ifeq ($(OSARCH),OpenBSD)
-  PTLIB=-lpt_OpenBSD_x86_r
-  H323LIB=-lh323_OpenBSD_x86_r
+  PTLIB=-lpt
+  H323LIB=-lh323
 endif
 
 ifeq ($(OSARCH),linux-gnu)

Modified: team/qwell/codec_consistency_fix/channels/chan_dahdi.c
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/channels/chan_dahdi.c?view=diff&rev=147586&r1=147585&r2=147586
==============================================================================
--- team/qwell/codec_consistency_fix/channels/chan_dahdi.c (original)
+++ team/qwell/codec_consistency_fix/channels/chan_dahdi.c Wed Oct  8 12:29:45 2008
@@ -3638,6 +3638,13 @@
 		break;
 	case AST_OPTION_OPRMODE:  /* Operator services mode */
 		oprmode = (struct oprmode *) data;
+		/* We don't support operator mode across technologies */
+		if (strcasecmp(chan->tech->type, oprmode->peer->tech->type)) {
+			ast_log(LOG_NOTICE, "Operator mode not supported on %s to %s calls.\n",
+					chan->tech->type, oprmode->peer->tech->type);
+			errno = EINVAL;
+			return -1;
+		}
 		pp = oprmode->peer->tech_pvt;
 		p->oprmode = pp->oprmode = 0;
 		/* setup peers */

Modified: team/qwell/codec_consistency_fix/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/channels/chan_iax2.c?view=diff&rev=147586&r1=147585&r2=147586
==============================================================================
--- team/qwell/codec_consistency_fix/channels/chan_iax2.c (original)
+++ team/qwell/codec_consistency_fix/channels/chan_iax2.c Wed Oct  8 12:29:45 2008
@@ -3822,6 +3822,9 @@
 	case AST_OPTION_RXGAIN:
 		/* these two cannot be sent, because they require a result */
 		errno = ENOSYS;
+		return -1;
+	case AST_OPTION_OPRMODE:
+		errno = EINVAL;
 		return -1;
 	default:
 		if (!(h = ast_malloc(datalen + sizeof(*h))))

Modified: team/qwell/codec_consistency_fix/configs/iax.conf.sample
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/configs/iax.conf.sample?view=diff&rev=147586&r1=147585&r2=147586
==============================================================================
--- team/qwell/codec_consistency_fix/configs/iax.conf.sample (original)
+++ team/qwell/codec_consistency_fix/configs/iax.conf.sample Wed Oct  8 12:29:45 2008
@@ -170,7 +170,7 @@
 ; This setting sets the maximum transmission unit for IAX2 UDP trunking.
 ; default is 1240 bytes. Zero disables this functionality and let's the O/S handle fragmentation.
 ;
-; trunkmtu = 0
+; trunkmtu = 1240
 ;
 ; Enable IAX2 encryption.  The default is no.
 ;

Modified: team/qwell/codec_consistency_fix/configure.ac
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/configure.ac?view=diff&rev=147586&r1=147585&r2=147586
==============================================================================
--- team/qwell/codec_consistency_fix/configure.ac (original)
+++ team/qwell/codec_consistency_fix/configure.ac Wed Oct  8 12:29:45 2008
@@ -27,12 +27,24 @@
 AC_USE_SYSTEM_EXTENSIONS	# note- does not work on FreeBSD
 
 case "${host_os}" in
-     freebsd*|openbsd*)
+     freebsd*)
      ac_default_prefix=/usr/local
      CPPFLAGS=-I/usr/local/include
      LDFLAGS=-L/usr/local/lib
      ;;
-
+     openbsd*)
+     ac_default_prefix=/usr/local
+     if test ${prefix} = '/usr/local' || test ${prefix} = 'NONE'; then
+        if test ${sysconfdir} = '${prefix}/etc'; then
+           sysconfdir=/etc
+        fi
+        if test ${mandir} = '${prefix}/man'; then
+           mandir=/usr/share/man
+        fi
+     fi
+     CPPFLAGS=-I/usr/local/include
+     LDFLAGS=-L/usr/local/lib
+     ;;
      *)
      ac_default_prefix=/usr
      if test ${prefix} = '/usr' || test ${prefix} = 'NONE'; then
@@ -1464,7 +1476,12 @@
 
 AST_EXT_LIB_CHECK([USB], [usb], [usb_init], [usb.h], [])
 
-AST_EXT_LIB_CHECK([VORBIS], [vorbis], [vorbis_info_init], [vorbis/codec.h], [-lm -lvorbisenc])
+if test "${OSARCH}" = "OpenBSD";
+then
+	AST_EXT_LIB_CHECK([VORBIS], [vorbis], [vorbis_info_init], [vorbis/codec.h], [-lm -lvorbisenc -logg])
+else
+	AST_EXT_LIB_CHECK([VORBIS], [vorbis], [vorbis_info_init], [vorbis/codec.h], [-lm -lvorbisenc])
+fi
 
 AC_LANG_PUSH(C++)
 

Modified: team/qwell/codec_consistency_fix/contrib/scripts/safe_asterisk
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/contrib/scripts/safe_asterisk?view=diff&rev=147586&r1=147585&r2=147586
==============================================================================
--- team/qwell/codec_consistency_fix/contrib/scripts/safe_asterisk (original)
+++ team/qwell/codec_consistency_fix/contrib/scripts/safe_asterisk Wed Oct  8 12:29:45 2008
@@ -184,7 +184,7 @@
 		sleep $SLEEPSECS
 		if [ $KILLALLMPG123 ]
 		then
-			killall -9 mpg123
+			pkill -9 mpg123
 		fi
 	done
 }

Modified: team/qwell/codec_consistency_fix/contrib/scripts/safe_asterisk_restart
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/contrib/scripts/safe_asterisk_restart?view=diff&rev=147586&r1=147585&r2=147586
==============================================================================
--- team/qwell/codec_consistency_fix/contrib/scripts/safe_asterisk_restart (original)
+++ team/qwell/codec_consistency_fix/contrib/scripts/safe_asterisk_restart Wed Oct  8 12:29:45 2008
@@ -101,8 +101,8 @@
 
 # doing the dirty work
 [[ $TRY_STOP_NOW_FIRST ]] && docmd "Asking asterisk kindly to shutdown" "$ASTERISK -rx 'stop now'"
-docmd "Sending asterisk processes the TERM signal" "killall -15 $PROCVICTIMS"
-docmd "Sending asterisk processes KILL signal" "killall -9 $PROCVICTIMS"
+docmd "Sending asterisk processes the TERM signal" "pkill -15 $PROCVICTIMS"
+docmd "Sending asterisk processes KILL signal" "pkill -9 $PROCVICTIMS"
 docmd "Starting safe_asterisk" "$SAFE_ASTERISK"
 for i in $PROCVICTIMS
 do

Modified: team/qwell/codec_consistency_fix/funcs/func_curl.c
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/funcs/func_curl.c?view=diff&rev=147586&r1=147585&r2=147586
==============================================================================
--- team/qwell/codec_consistency_fix/funcs/func_curl.c (original)
+++ team/qwell/codec_consistency_fix/funcs/func_curl.c Wed Oct  8 12:29:45 2008
@@ -73,12 +73,12 @@
 static void curlds_free(void *data)
 {
 	AST_LIST_HEAD(global_curl_info, curl_settings) *list = data;
-	struct curl_settings *cur;
+	struct curl_settings *setting;
 	if (!list) {
 		return;
 	}
-	while ((cur = AST_LIST_REMOVE_HEAD(list, list))) {
-		free(cur);
+	while ((setting = AST_LIST_REMOVE_HEAD(list, list))) {
+		free(setting);
 	}
 	AST_LIST_HEAD_DESTROY(list);
 }

Modified: team/qwell/codec_consistency_fix/include/asterisk/options.h
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/include/asterisk/options.h?view=diff&rev=147586&r1=147585&r2=147586
==============================================================================
--- team/qwell/codec_consistency_fix/include/asterisk/options.h (original)
+++ team/qwell/codec_consistency_fix/include/asterisk/options.h Wed Oct  8 12:29:45 2008
@@ -86,6 +86,8 @@
 	AST_OPT_FLAG_LIGHT_BACKGROUND = (1 << 25),
 	/*! Count Initiated seconds in CDR's */
 	AST_OPT_FLAG_INITIATED_SECONDS = (1 << 26),
+	/*! Force black background */
+	AST_OPT_FLAG_FORCE_BLACK_BACKGROUND = (1 << 27),
 };
 
 /*! These are the options that set by default when Asterisk starts */
@@ -116,6 +118,7 @@
 #define ast_opt_dbg_file		ast_test_flag(&ast_options, AST_OPT_FLAG_DEBUG_FILE)
 #define ast_opt_verb_file		ast_test_flag(&ast_options, AST_OPT_FLAG_VERBOSE_FILE)
 #define ast_opt_light_background		ast_test_flag(&ast_options, AST_OPT_FLAG_LIGHT_BACKGROUND)
+#define ast_opt_force_black_background		ast_test_flag(&ast_options, AST_OPT_FLAG_FORCE_BLACK_BACKGROUND)
 
 extern struct ast_flags ast_options;
 

Modified: team/qwell/codec_consistency_fix/main/asterisk.c
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/main/asterisk.c?view=diff&rev=147586&r1=147585&r2=147586
==============================================================================
--- team/qwell/codec_consistency_fix/main/asterisk.c (original)
+++ team/qwell/codec_consistency_fix/main/asterisk.c Wed Oct  8 12:29:45 2008
@@ -2795,6 +2795,8 @@
 				ast_verbose("Invalid Entity ID '%s' provided\n", v->value);
 		} else if (!strcasecmp(v->name, "lightbackground")) {
 			ast_set2_flag(&ast_options, ast_true(v->value), AST_OPT_FLAG_LIGHT_BACKGROUND);
+		} else if (!strcasecmp(v->name, "forceblackbackground")) {
+			ast_set2_flag(&ast_options, ast_true(v->value), AST_OPT_FLAG_FORCE_BLACK_BACKGROUND);
 		}
 	}
 	for (v = ast_variable_browse(cfg, "compat"); v; v = v->next) {
@@ -2937,7 +2939,7 @@
 	if (getenv("HOME")) 
 		snprintf(filename, sizeof(filename), "%s/.asterisk_history", getenv("HOME"));
 	/* Check for options */
-	while ((c = getopt(argc, argv, "mtThfFdvVqprRgciInx:U:G:C:L:M:e:s:W")) != -1) {
+	while ((c = getopt(argc, argv, "mtThfFdvVqprRgciInx:U:G:C:L:M:e:s:WB")) != -1) {
 		switch (c) {
 #if defined(HAVE_SYSINFO)
 		case 'e':
@@ -3031,6 +3033,11 @@
 			break;
 		case 'W': /* White background */
 			ast_set_flag(&ast_options, AST_OPT_FLAG_LIGHT_BACKGROUND);
+			ast_clear_flag(&ast_options, AST_OPT_FLAG_FORCE_BLACK_BACKGROUND);
+			break;
+		case 'B': /* Force black background */
+			ast_set_flag(&ast_options, AST_OPT_FLAG_FORCE_BLACK_BACKGROUND);
+			ast_clear_flag(&ast_options, AST_OPT_FLAG_LIGHT_BACKGROUND);
 			break;
 		case '?':
 			exit(1);

Modified: team/qwell/codec_consistency_fix/main/features.c
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/main/features.c?view=diff&rev=147586&r1=147585&r2=147586
==============================================================================
--- team/qwell/codec_consistency_fix/main/features.c (original)
+++ team/qwell/codec_consistency_fix/main/features.c Wed Oct  8 12:29:45 2008
@@ -2797,9 +2797,6 @@
 	if (!res) {
 		struct ast_park_call_args args = {
 			.orig_chan_name = orig_chan_name,
-			.extout = NULL,
-			.return_con = NULL,
-			.return_ext = NULL,
 		};
 		struct ast_flags flags = { 0 };
 

Modified: team/qwell/codec_consistency_fix/main/term.c
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/main/term.c?view=diff&rev=147586&r1=147585&r2=147586
==============================================================================
--- team/qwell/codec_consistency_fix/main/term.c (original)
+++ team/qwell/codec_consistency_fix/main/term.c Wed Oct  8 12:29:45 2008
@@ -152,6 +152,10 @@
 			snprintf(prepdata, sizeof(prepdata), "%c[%dm", ESC, COLOR_BROWN);
 			snprintf(enddata, sizeof(enddata), "%c[%dm", ESC, COLOR_BLACK);
 			snprintf(quitdata, sizeof(quitdata), "%c[0m", ESC);
+		} else if (ast_opt_force_black_background) {
+			snprintf(prepdata, sizeof(prepdata), "%c[%d;%d;%dm", ESC, ATTR_BRIGHT, COLOR_BROWN, COLOR_BLACK + 10);
+			snprintf(enddata, sizeof(enddata), "%c[%d;%d;%dm", ESC, ATTR_RESET, COLOR_WHITE, COLOR_BLACK + 10);
+			snprintf(quitdata, sizeof(quitdata), "%c[0m", ESC);
 		} else {
 			snprintf(prepdata, sizeof(prepdata), "%c[%d;%dm", ESC, ATTR_BRIGHT, COLOR_BROWN);
 			snprintf(enddata, sizeof(enddata), "%c[%d;%dm", ESC, ATTR_RESET, COLOR_WHITE);
@@ -179,11 +183,19 @@
 		fgcolor &= ~128;
 	}
 
+	if (bgcolor) {
+		bgcolor &= ~128;
+	}
+
 	if (ast_opt_light_background) {
 		fgcolor = opposite(fgcolor);
 	}
 
-	snprintf(outbuf, maxout, "%c[%d;%dm%s%c[0m", ESC, attr, fgcolor, inbuf, ESC);
+	if (ast_opt_force_black_background) {
+		snprintf(outbuf, maxout, "%c[%d;%d;%dm%s%c[%d;%dm", ESC, attr, fgcolor, bgcolor + 10, inbuf, ESC, COLOR_WHITE, COLOR_BLACK + 10);
+	} else {
+		snprintf(outbuf, maxout, "%c[%d;%dm%s%c[0m", ESC, attr, fgcolor, inbuf, ESC);
+	}
 	return outbuf;
 }
 
@@ -204,7 +216,15 @@
 		fgcolor = opposite(fgcolor);
 	}
 
-	snprintf(outbuf, maxout, "%c[%d;%dm", ESC, attr, fgcolor);
+	if (bgcolor) {
+		bgcolor &= ~128;
+	}
+
+	if (ast_opt_force_black_background) {
+		snprintf(outbuf, maxout, "%c[%d;%d;%dm", ESC, attr, fgcolor, bgcolor + 10);
+	} else {
+		snprintf(outbuf, maxout, "%c[%d;%dm", ESC, attr, fgcolor);
+	}
 	return outbuf;
 }
 
@@ -235,7 +255,13 @@
 		ast_copy_string(outbuf, inbuf, maxout);
 		return outbuf;
 	}
-	if (ast_opt_light_background) {
+	if (ast_opt_force_black_background) {
+		snprintf(outbuf, maxout, "%c[%d;%dm%c%c[%d;%dm%s",
+			ESC, COLOR_BLUE, COLOR_BLACK + 10,
+			inbuf[0],
+			ESC, COLOR_WHITE, COLOR_BLACK + 10,
+			inbuf + 1);
+	} else if (ast_opt_light_background) {
 		snprintf(outbuf, maxout, "%c[%d;0m%c%c[%d;0m%s",
 			ESC, COLOR_BLUE,
 			inbuf[0],

Modified: team/qwell/codec_consistency_fix/res/res_odbc.c
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/res/res_odbc.c?view=diff&rev=147586&r1=147585&r2=147586
==============================================================================
--- team/qwell/codec_consistency_fix/res/res_odbc.c (original)
+++ team/qwell/codec_consistency_fix/res/res_odbc.c Wed Oct  8 12:29:45 2008
@@ -758,7 +758,7 @@
 	int res;
 	SQLINTEGER err;
 	short int mlen;
-	unsigned char msg[200], stat[10];
+	unsigned char msg[200], state[10];
 
 	/* Nothing to disconnect */
 	if (!obj->con) {
@@ -779,7 +779,7 @@
 		obj->con = NULL;
 		ast_log(LOG_DEBUG, "Database handle deallocated\n");
 	} else {
-		SQLGetDiagRec(SQL_HANDLE_DBC, obj->con, 1, stat, &err, msg, 100, &mlen);
+		SQLGetDiagRec(SQL_HANDLE_DBC, obj->con, 1, state, &err, msg, 100, &mlen);
 		ast_log(LOG_WARNING, "Unable to deallocate database handle? %d errno=%d %s\n", res, (int)err, msg);
 	}
 

Modified: team/qwell/codec_consistency_fix/utils/Makefile
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/utils/Makefile?view=diff&rev=147586&r1=147585&r2=147586
==============================================================================
--- team/qwell/codec_consistency_fix/utils/Makefile (original)
+++ team/qwell/codec_consistency_fix/utils/Makefile Wed Oct  8 12:29:45 2008
@@ -80,7 +80,7 @@
 	rm -f utils.c threadstorage.c sha1.c astobj2.c hashtest2 hashtest refcounter
 
 md5.c: $(ASTTOPDIR)/main/md5.c
-	$(ECHO_PREFIX) echo "   [CP] $< -> $@"
+	$(ECHO_PREFIX) echo "   [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
 	$(CMD_PREFIX) cp "$<" "$@"
 md5.o: ASTCFLAGS+=-DSTANDALONE
 
@@ -92,28 +92,28 @@
 stereorize: LIBS+=-lm
 
 hashtab.c: $(ASTTOPDIR)/main/hashtab.c
-	$(ECHO_PREFIX) echo "   [CP] $< -> $@"
+	$(ECHO_PREFIX) echo "   [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
 	$(CMD_PREFIX) cp "$<" "$@"
 
 hashtab.o: ASTCFLAGS+=-DSTANDALONE
 
 strcompat.c: $(ASTTOPDIR)/main/strcompat.c
-	$(ECHO_PREFIX) echo "   [CP] $< -> $@"
+	$(ECHO_PREFIX) echo "   [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
 	$(CMD_PREFIX) cp "$<" "$@"
 strcompat.o: ASTCFLAGS+=-DSTANDALONE
 
 pval.c: $(ASTTOPDIR)/res/ael/pval.c
-	$(ECHO_PREFIX) echo "   [CP] $< -> $@"
+	$(ECHO_PREFIX) echo "   [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
 	$(CMD_PREFIX) cp "$<" "$@"
 pval.o : ASTCFLAGS+=-DSTANDALONE
 
 ast_expr2.c: $(ASTTOPDIR)/main/ast_expr2.c
-	$(ECHO_PREFIX) echo "   [CP] $< -> $@"
+	$(ECHO_PREFIX) echo "   [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
 	$(CMD_PREFIX) cp "$<" "$@"
 ast_expr2.o: ASTCFLAGS+=-DSTANDALONE
 
 ast_expr2f.c: $(ASTTOPDIR)/main/ast_expr2f.c
-	$(ECHO_PREFIX) echo "   [CP] $< -> $@"
+	$(ECHO_PREFIX) echo "   [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
 	$(CMD_PREFIX) cp "$<" "$@"
 ast_expr2f.o: ASTCFLAGS+=-DSTANDALONE -I$(ASTTOPDIR)/main -Wno-unused
 
@@ -121,17 +121,17 @@
 check_expr.o: ASTCFLAGS+=-DSTANDALONE
 
 aelbison.c: $(ASTTOPDIR)/res/ael/ael.tab.c
-	$(ECHO_PREFIX) echo "   [CP] $< -> $@"
+	$(ECHO_PREFIX) echo "   [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
 	$(CMD_PREFIX) cp "$<" "$@"
 aelbison.o: ASTCFLAGS+=-I$(ASTTOPDIR)/res/ael  -DYYENABLE_NLS=0 -DSTANDALONE
 
 pbx_ael.c: $(ASTTOPDIR)/pbx/pbx_ael.c
-	$(ECHO_PREFIX) echo "   [CP] $< -> $@"
+	$(ECHO_PREFIX) echo "   [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
 	$(CMD_PREFIX) cp "$<" "$@"
 pbx_ael.o: ASTCFLAGS+=-DSTANDALONE
 
 aelparse.c: $(ASTTOPDIR)/res/ael/ael_lex.c
-	$(ECHO_PREFIX) echo "   [CP] $< -> $@"
+	$(ECHO_PREFIX) echo "   [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
 	$(CMD_PREFIX) cp "$<" "$@"
 
 ael_main.o: ASTCFLAGS+=-DSTANDALONE
@@ -140,22 +140,22 @@
 aelparse: aelparse.o aelbison.o pbx_ael.o hashtab.o ael_main.o ast_expr2f.o ast_expr2.o strcompat.o pval.o extconf.o
 
 astobj2.c: $(ASTTOPDIR)/main/astobj2.c
-	$(ECHO_PREFIX) echo "   [CP] $< -> $@"
+	$(ECHO_PREFIX) echo "   [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
 	$(CMD_PREFIX) cp "$<" "$@"
 astobj2.o: ASTCFLAGS+=-DSTANDALONE
 
 utils.c: $(ASTTOPDIR)/main/utils.c
-	$(ECHO_PREFIX) echo "   [CP] $< -> $@"
+	$(ECHO_PREFIX) echo "   [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
 	$(CMD_PREFIX) cp "$<" "$@"
 utils.o: ASTCFLAGS+=-DSTANDALONE
 
 sha1.c: $(ASTTOPDIR)/main/sha1.c
-	$(ECHO_PREFIX) echo "   [CP] $< -> $@"
+	$(ECHO_PREFIX) echo "   [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
 	$(CMD_PREFIX) cp "$<" "$@"
 sha1.o: ASTCFLAGS+=-DSTANDALONE
 
 threadstorage.c: $(ASTTOPDIR)/main/threadstorage.c
-	$(ECHO_PREFIX) echo "   [CP] $< -> $@"
+	$(ECHO_PREFIX) echo "   [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
 	$(CMD_PREFIX) cp "$<" "$@"
 threadstorage.o: ASTCFLAGS+=-DSTANDALONE
 




More information about the asterisk-commits mailing list