summaryrefslogtreecommitdiffstats
path: root/modules/loggers
diff options
context:
space:
mode:
authorJeff Trawick <trawick@apache.org>2013-09-27 19:52:13 +0200
committerJeff Trawick <trawick@apache.org>2013-09-27 19:52:13 +0200
commit528855d54438913d6f07f839b2322fe24912ee49 (patch)
tree3fe3b79c974ed4ae79cb89db4fbc46244fa71c03 /modules/loggers
parentmod_lua: Use a (new) global pool/mutex setup for IVM rather than a per-proces... (diff)
downloadapache2-528855d54438913d6f07f839b2322fe24912ee49.tar.xz
apache2-528855d54438913d6f07f839b2322fe24912ee49.zip
Error log providers need to be able to trigger a startup error from their
init() function. A NULL return code is the trigger. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1527003 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/loggers')
-rw-r--r--modules/loggers/mod_syslog.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/loggers/mod_syslog.c b/modules/loggers/mod_syslog.c
index e04e2d9284..fcea7875a0 100644
--- a/modules/loggers/mod_syslog.c
+++ b/modules/loggers/mod_syslog.c
@@ -107,6 +107,8 @@ static const TRANS facilities[] = {
static void *syslog_error_log_init(apr_pool_t *p, server_rec *s)
{
char *fname = s->error_fname;
+ void *success = (void *)p; /* anything non-NULL is success */
+
if (*fname == '\0') {
openlog(ap_server_argv0, LOG_NDELAY|LOG_CONS|LOG_PID, LOG_LOCAL7);
}
@@ -117,12 +119,12 @@ static void *syslog_error_log_init(apr_pool_t *p, server_rec *s)
if (!strcasecmp(fname, fac->t_name)) {
openlog(ap_server_argv0, LOG_NDELAY|LOG_CONS|LOG_PID,
fac->t_val);
- return NULL;
+ return success;
}
}
}
- return NULL;
+ return success;
}
static apr_status_t syslog_error_log(const ap_errorlog_info *info,