[svn-commits] seanbright: branch seanbright/issue14905 r200941 - /team/seanbright/issue1490...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Tue Jun 16 09:49:52 CDT 2009
Author: seanbright
Date: Tue Jun 16 09:49:43 2009
New Revision: 200941
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=200941
Log:
Death to trailing whitespace.
Modified:
team/seanbright/issue14905/main/logger.c
Modified: team/seanbright/issue14905/main/logger.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/seanbright/issue14905/main/logger.c?view=diff&rev=200941&r1=200940&r2=200941
==============================================================================
--- team/seanbright/issue14905/main/logger.c (original)
+++ team/seanbright/issue14905/main/logger.c Tue Jun 16 09:49:43 2009
@@ -19,7 +19,7 @@
/*! \file
*
* \brief Asterisk Logger
- *
+ *
* Logging routines
*
* \author Mark Spencer <markster at digium.com>
@@ -36,7 +36,7 @@
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
/*
- * WARNING: additional #include directives should NOT be placed here, they
+ * WARNING: additional #include directives should NOT be placed here, they
* should be placed AFTER '#undef _ASTERISK_LOGGER_H' below
*/
#include "asterisk/_private.h"
@@ -294,41 +294,41 @@
}
#else
chan->facility = -1;
- if (!strcasecmp(facility, "kern"))
+ if (!strcasecmp(facility, "kern"))
chan->facility = LOG_KERN;
- else if (!strcasecmp(facility, "USER"))
+ else if (!strcasecmp(facility, "USER"))
chan->facility = LOG_USER;
- else if (!strcasecmp(facility, "MAIL"))
+ else if (!strcasecmp(facility, "MAIL"))
chan->facility = LOG_MAIL;
- else if (!strcasecmp(facility, "DAEMON"))
+ else if (!strcasecmp(facility, "DAEMON"))
chan->facility = LOG_DAEMON;
- else if (!strcasecmp(facility, "AUTH"))
+ else if (!strcasecmp(facility, "AUTH"))
chan->facility = LOG_AUTH;
- else if (!strcasecmp(facility, "SYSLOG"))
+ else if (!strcasecmp(facility, "SYSLOG"))
chan->facility = LOG_SYSLOG;
- else if (!strcasecmp(facility, "LPR"))
+ else if (!strcasecmp(facility, "LPR"))
chan->facility = LOG_LPR;
- else if (!strcasecmp(facility, "NEWS"))
+ else if (!strcasecmp(facility, "NEWS"))
chan->facility = LOG_NEWS;
- else if (!strcasecmp(facility, "UUCP"))
+ else if (!strcasecmp(facility, "UUCP"))
chan->facility = LOG_UUCP;
- else if (!strcasecmp(facility, "CRON"))
+ else if (!strcasecmp(facility, "CRON"))
chan->facility = LOG_CRON;
- else if (!strcasecmp(facility, "LOCAL0"))
+ else if (!strcasecmp(facility, "LOCAL0"))
chan->facility = LOG_LOCAL0;
- else if (!strcasecmp(facility, "LOCAL1"))
+ else if (!strcasecmp(facility, "LOCAL1"))
chan->facility = LOG_LOCAL1;
- else if (!strcasecmp(facility, "LOCAL2"))
+ else if (!strcasecmp(facility, "LOCAL2"))
chan->facility = LOG_LOCAL2;
- else if (!strcasecmp(facility, "LOCAL3"))
+ else if (!strcasecmp(facility, "LOCAL3"))
chan->facility = LOG_LOCAL3;
- else if (!strcasecmp(facility, "LOCAL4"))
+ else if (!strcasecmp(facility, "LOCAL4"))
chan->facility = LOG_LOCAL4;
- else if (!strcasecmp(facility, "LOCAL5"))
+ else if (!strcasecmp(facility, "LOCAL5"))
chan->facility = LOG_LOCAL5;
- else if (!strcasecmp(facility, "LOCAL6"))
+ else if (!strcasecmp(facility, "LOCAL6"))
chan->facility = LOG_LOCAL6;
- else if (!strcasecmp(facility, "LOCAL7"))
+ else if (!strcasecmp(facility, "LOCAL7"))
chan->facility = LOG_LOCAL7;
#endif /* Solaris */
@@ -352,7 +352,7 @@
if (!(chan->fileptr = fopen(chan->filename, "a"))) {
/* Can't log here, since we're called with a lock */
fprintf(stderr, "Logger Warning: Unable to open log file '%s': %s\n", chan->filename, strerror(errno));
- }
+ }
chan->type = LOGTYPE_FILE;
}
chan->logmask = make_components(chan->components, lineno);
@@ -379,11 +379,11 @@
global_logmask = 0;
if (!locked)
AST_RWLIST_UNLOCK(&logchannels);
-
+
errno = 0;
/* close syslog */
closelog();
-
+
/* If no config file, we're fine, set default options. */
if (!cfg) {
if (errno)
@@ -402,7 +402,7 @@
AST_RWLIST_UNLOCK(&logchannels);
return;
}
-
+
if ((s = ast_variable_retrieve(cfg, "general", "appendhostname"))) {
if (ast_true(s)) {
if (gethostname(hostname, sizeof(hostname) - 1)) {
@@ -515,10 +515,10 @@
vsnprintf(qlog_msg, sizeof(qlog_msg), fmt, ap);
va_end(ap);
snprintf(time_str, sizeof(time_str), "%ld", (long)time(NULL));
- ast_store_realtime("queue_log", "time", time_str,
- "callid", callid,
- "queuename", queuename,
- "agent", agent,
+ ast_store_realtime("queue_log", "time", time_str,
+ "callid", callid,
+ "queuename", queuename,
+ "agent", agent,
"event", event,
"data", qlog_msg,
SENTINEL);
@@ -647,7 +647,7 @@
fclose(qlog);
qlog = NULL;
}
- } else
+ } else
queue_rotate = 0;
ast_mkdir(ast_config_AST_LOG_DIR, 0777);
@@ -705,7 +705,7 @@
switch (cmd) {
case CLI_INIT:
e->command = "logger reload";
- e->usage =
+ e->usage =
"Usage: logger reload\n"
" Reloads the logger subsystem state. Use after restarting syslogd(8) if you are using syslog logging.\n";
return NULL;
@@ -724,17 +724,17 @@
switch (cmd) {
case CLI_INIT:
e->command = "logger rotate";
- e->usage =
+ e->usage =
"Usage: logger rotate\n"
" Rotates and Reopens the log files.\n";
return NULL;
case CLI_GENERATE:
- return NULL;
+ return NULL;
}
if (reload_logger(1)) {
ast_cli(a->fd, "Failed to reload the logger and rotate log files\n");
return CLI_FAILURE;
- }
+ }
return CLI_SUCCESS;
}
@@ -747,7 +747,7 @@
switch (cmd) {
case CLI_INIT:
e->command = "logger set level";
- e->usage =
+ e->usage =
"Usage: logger set level\n"
" Set a specific log level to enabled/disabled for this console.\n";
return NULL;
@@ -788,12 +788,12 @@
switch (cmd) {
case CLI_INIT:
e->command = "logger show channels";
- e->usage =
+ e->usage =
"Usage: logger show channels\n"
" List configured logger channels.\n";
return NULL;
case CLI_GENERATE:
- return NULL;
+ return NULL;
}
ast_cli(a->fd, FORMATL, "Channel", "Type", "Status");
ast_cli(a->fd, "Configuration\n");
@@ -815,7 +815,7 @@
}
AST_RWLIST_UNLOCK(&logchannels);
ast_cli(a->fd, "\n");
-
+
return CLI_SUCCESS;
}
@@ -833,7 +833,7 @@
AST_CLI_DEFINE(handle_logger_set_level, "Enables/Disables a specific logging level for this console")
};
-static int handle_SIGXFSZ(int sig)
+static int handle_SIGXFSZ(int sig)
{
/* Indicate need to reload */
filesize_reload_needed = 1;
@@ -910,7 +910,7 @@
/* If no file pointer exists, skip it */
if (!chan->fileptr)
continue;
-
+
/* Print out to the file */
res = fprintf(chan->fileptr, "[%s] %s[%ld] %s: %s",
logmsg->date, logmsg->level_name, logmsg->process_id, logmsg->file, logmsg->message);
@@ -1017,7 +1017,7 @@
ast_cli_register_multiple(cli_logger, ARRAY_LEN(cli_logger));
ast_mkdir(ast_config_AST_LOG_DIR, 0777);
-
+
/* create log channels */
init_logger_chain(0 /* locked */);
@@ -1096,7 +1096,7 @@
}
return;
}
-
+
/* don't display LOG_DEBUG messages unless option_verbose _or_ option_debug
are non-zero; LOG_DEBUG messages can still be displayed if option_debug
is zero, if option_verbose is non-zero (this allows for 'level zero'
@@ -1109,7 +1109,7 @@
/* Ignore anything that never gets logged anywhere */
if (!(global_logmask & (1 << level)))
return;
-
+
/* Build string */
va_start(ap, fmt);
res = ast_str_set_va(&buf, BUFSIZ, fmt, ap);
@@ -1158,7 +1158,7 @@
#ifdef HAVE_BKTR
-struct ast_bt *ast_bt_create(void)
+struct ast_bt *ast_bt_create(void)
{
struct ast_bt *bt = ast_calloc(1, sizeof(*bt));
if (!bt) {
@@ -1264,7 +1264,7 @@
/* Set type */
logmsg->type = LOGMSG_VERBOSE;
-
+
/* Add to the list and poke the thread if possible */
if (logthread != AST_PTHREADT_NULL) {
AST_LIST_LOCK(&logmsgs);
@@ -1298,7 +1298,7 @@
va_end(ap);
}
-int ast_register_verbose(void (*v)(const char *string))
+int ast_register_verbose(void (*v)(const char *string))
{
struct verb *verb;
@@ -1310,7 +1310,7 @@
AST_RWLIST_WRLOCK(&verbosers);
AST_RWLIST_INSERT_HEAD(&verbosers, verb, list);
AST_RWLIST_UNLOCK(&verbosers);
-
+
return 0;
}
@@ -1328,7 +1328,7 @@
}
AST_RWLIST_TRAVERSE_SAFE_END;
AST_RWLIST_UNLOCK(&verbosers);
-
+
return cur ? 0 : -1;
}
More information about the svn-commits
mailing list