[asterisk-commits] twilson: branch group/calendaring_ews r264163 - in /team/group/calendaring_ew...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed May 19 11:10:45 CDT 2010


Author: twilson
Date: Wed May 19 11:10:41 2010
New Revision: 264163

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=264163
Log:
Merged revisions 264160-264161 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
  r264160 | kpfleming | 2010-05-19 10:29:28 -0500 (Wed, 19 May 2010) | 11 lines
  
  Add ability for logger channels to include *all* levels.
  
  Now that Asterisk modules can dynamically create and destroy logger levels
  on demand, it's useful to be able to configure a logger channel (console,
  file, whatever) to be able to accept log messages from *all* levels, even
  levels created dynamically. This patch adds support for this, by allowing
  the '*' level name to be used in logger.conf.
  
  Review: https://reviewboard.asterisk.org/r/663/
........
  r264161 | lmadsen | 2010-05-19 10:39:39 -0500 (Wed, 19 May 2010) | 3 lines
  
  Fix compilation problem with previous commit.
  
  (issue #16009)
........

Modified:
    team/group/calendaring_ews/   (props changed)
    team/group/calendaring_ews/configs/logger.conf.sample
    team/group/calendaring_ews/main/cli.c
    team/group/calendaring_ews/main/logger.c

Propchange: team/group/calendaring_ews/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed May 19 11:10:41 2010
@@ -1,1 +1,1 @@
-/trunk:1-264120
+/trunk:1-264162

Modified: team/group/calendaring_ews/configs/logger.conf.sample
URL: http://svnview.digium.com/svn/asterisk/team/group/calendaring_ews/configs/logger.conf.sample?view=diff&rev=264163&r1=264162&r2=264163
==============================================================================
--- team/group/calendaring_ews/configs/logger.conf.sample (original)
+++ team/group/calendaring_ews/configs/logger.conf.sample Wed May 19 11:10:41 2010
@@ -73,6 +73,15 @@
 ; (see 'astlogdir' in asterisk.conf), or absolute paths that begin with
 ; '/'.
 ;
+; Special level name "*" means all levels, even dynamic levels registered
+; by modules after the logger has been initialized (this means that loading
+; and unloading modules that create/remove dynamic logger levels will result
+; in these levels being included on filenames that have a level name of "*",
+; without any need to perform a 'logger reload' or similar operation). Note
+; that there is no value in specifying both "*" and specific level names for
+; a filename; the "*" level means all levels, and the remaining level names
+; will be ignored.
+;
 ; We highly recommend that you DO NOT turn on debug mode if you are simply
 ; running a production system.  Debug mode turns on a LOT of extra messages,
 ; most of which you are unlikely to understand without an understanding of

Modified: team/group/calendaring_ews/main/cli.c
URL: http://svnview.digium.com/svn/asterisk/team/group/calendaring_ews/main/cli.c?view=diff&rev=264163&r1=264162&r2=264163
==============================================================================
--- team/group/calendaring_ews/main/cli.c (original)
+++ team/group/calendaring_ews/main/cli.c Wed May 19 11:10:41 2010
@@ -952,7 +952,7 @@
 
 	if (!strcasecmp(a->argv[3], "all")) {
 		struct ast_channel_iterator *iter = NULL;
-		if (!(iter = ast_channel_iterator_all_new(0))) {
+		if (!(iter = ast_channel_iterator_all_new())) {
 			return CLI_FAILURE;
 		}
 		for (; iter && (c = ast_channel_iterator_next(iter)); ast_channel_unref(c)) {

Modified: team/group/calendaring_ews/main/logger.c
URL: http://svnview.digium.com/svn/asterisk/team/group/calendaring_ews/main/logger.c?view=diff&rev=264163&r1=264162&r2=264163
==============================================================================
--- team/group/calendaring_ews/main/logger.c (original)
+++ team/group/calendaring_ews/main/logger.c Wed May 19 11:10:41 2010
@@ -214,14 +214,14 @@
 	unsigned int x;
 
 	while ((w = strsep(&stringp, ","))) {
-		int found = 0;
-
 		w = ast_skip_blanks(w);
 
-		for (x = 0; x < ARRAY_LEN(levels); x++) {
+		if (!strcmp(w, "*")) {
+			res = 0xFFFF;
+			break;
+		} else for (x = 0; x < ARRAY_LEN(levels); x++) {
 			if (levels[x] && !strcasecmp(w, levels[x])) {
 				res |= (1 << x);
-				found = 1;
 				break;
 			}
 		}




More information about the asterisk-commits mailing list