[asterisk-commits] russell: trunk r203525 - /trunk/main/syslog.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Jun 25 19:21:12 CDT 2009
Author: russell
Date: Thu Jun 25 19:21:09 2009
New Revision: 203525
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=203525
Log:
Convert spaces to tabs for indentation.
Modified:
trunk/main/syslog.c
Modified: trunk/main/syslog.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/main/syslog.c?view=diff&rev=203525&r1=203524&r2=203525
==============================================================================
--- trunk/main/syslog.c (original)
+++ trunk/main/syslog.c Thu Jun 25 19:21:09 2009
@@ -32,87 +32,88 @@
int ast_syslog_facility(const char *facility)
{
- if (!strcasecmp(facility, "KERN")) {
+ if (!strcasecmp(facility, "KERN")) {
return LOG_KERN;
- } else if (!strcasecmp(facility, "USER")) {
+ } else if (!strcasecmp(facility, "USER")) {
return LOG_USER;
- } else if (!strcasecmp(facility, "MAIL")) {
+ } else if (!strcasecmp(facility, "MAIL")) {
return LOG_MAIL;
- } else if (!strcasecmp(facility, "DAEMON")) {
+ } else if (!strcasecmp(facility, "DAEMON")) {
return LOG_DAEMON;
- } else if (!strcasecmp(facility, "AUTH")) {
+ } else if (!strcasecmp(facility, "AUTH")) {
return LOG_AUTH;
} else if (!strcasecmp(facility, "AUTHPRIV")) {
return LOG_AUTHPRIV;
- } else if (!strcasecmp(facility, "SYSLOG")) {
+ } else if (!strcasecmp(facility, "SYSLOG")) {
return LOG_SYSLOG;
} else if (!strcasecmp(facility, "SECURITY")) {
return LOG_AUTH;
} else if (!strcasecmp(facility, "FTP")) {
return LOG_FTP;
- } else if (!strcasecmp(facility, "LPR")) {
+ } else if (!strcasecmp(facility, "LPR")) {
return LOG_LPR;
- } else if (!strcasecmp(facility, "NEWS")) {
+ } else if (!strcasecmp(facility, "NEWS")) {
return LOG_NEWS;
- } else if (!strcasecmp(facility, "UUCP")) {
+ } else if (!strcasecmp(facility, "UUCP")) {
return LOG_UUCP;
- } else if (!strcasecmp(facility, "CRON")) {
+ } else if (!strcasecmp(facility, "CRON")) {
return LOG_CRON;
- } else if (!strcasecmp(facility, "LOCAL0")) {
+ } else if (!strcasecmp(facility, "LOCAL0")) {
return LOG_LOCAL0;
- } else if (!strcasecmp(facility, "LOCAL1")) {
+ } else if (!strcasecmp(facility, "LOCAL1")) {
return LOG_LOCAL1;
- } else if (!strcasecmp(facility, "LOCAL2")) {
+ } else if (!strcasecmp(facility, "LOCAL2")) {
return LOG_LOCAL2;
- } else if (!strcasecmp(facility, "LOCAL3")) {
+ } else if (!strcasecmp(facility, "LOCAL3")) {
return LOG_LOCAL3;
- } else if (!strcasecmp(facility, "LOCAL4")) {
+ } else if (!strcasecmp(facility, "LOCAL4")) {
return LOG_LOCAL4;
- } else if (!strcasecmp(facility, "LOCAL5")) {
+ } else if (!strcasecmp(facility, "LOCAL5")) {
return LOG_LOCAL5;
- } else if (!strcasecmp(facility, "LOCAL6")) {
+ } else if (!strcasecmp(facility, "LOCAL6")) {
return LOG_LOCAL6;
- } else if (!strcasecmp(facility, "LOCAL7")) {
+ } else if (!strcasecmp(facility, "LOCAL7")) {
return LOG_LOCAL7;
- }
+ }
- return -1;
+ return -1;
}
int ast_syslog_priority(const char *priority)
{
- if (!strcasecmp(priority, "ALERT")) {
+ if (!strcasecmp(priority, "ALERT")) {
return LOG_ALERT;
- } else if (!strcasecmp(priority, "CRIT")) {
+ } else if (!strcasecmp(priority, "CRIT")) {
return LOG_CRIT;
- } else if (!strcasecmp(priority, "DEBUG")) {
+ } else if (!strcasecmp(priority, "DEBUG")) {
return LOG_DEBUG;
- } else if (!strcasecmp(priority, "EMERG")) {
+ } else if (!strcasecmp(priority, "EMERG")) {
return LOG_EMERG;
- } else if (!strcasecmp(priority, "ERR")) {
+ } else if (!strcasecmp(priority, "ERR")) {
return LOG_ERR;
- } else if (!strcasecmp(priority, "INFO")) {
+ } else if (!strcasecmp(priority, "INFO")) {
return LOG_INFO;
- } else if (!strcasecmp(priority, "NOTICE")) {
+ } else if (!strcasecmp(priority, "NOTICE")) {
return LOG_NOTICE;
- } else if (!strcasecmp(priority, "WARNING")) {
+ } else if (!strcasecmp(priority, "WARNING")) {
return LOG_WARNING;
- }
+ }
- return -1;
+ return -1;
}
static const int logger_level_to_syslog_map[] = {
[__LOG_DEBUG] = LOG_DEBUG,
- [1] = LOG_INFO, /* Only kept for backwards compatibility */
+ [1] = LOG_INFO, /* Only kept for backwards compatibility */
[__LOG_NOTICE] = LOG_NOTICE,
[__LOG_WARNING] = LOG_WARNING,
[__LOG_ERROR] = LOG_ERR,
[__LOG_VERBOSE] = LOG_DEBUG,
- [__LOG_DTMF] = LOG_DEBUG,
+ [__LOG_DTMF] = LOG_DEBUG,
};
-int ast_syslog_priority_from_loglevel(int level) {
+int ast_syslog_priority_from_loglevel(int level)
+{
if (level < 0 || level >= ARRAY_LEN(logger_level_to_syslog_map)) {
return -1;
}
More information about the asterisk-commits
mailing list