]> granicus.if.org Git - apache/commitdiff
We have a pool in this function, and log_error_core needs a pool in order
authorRyan Bloom <rbb@apache.org>
Sun, 31 Dec 2000 23:41:07 +0000 (23:41 +0000)
committerRyan Bloom <rbb@apache.org>
Sun, 31 Dec 2000 23:41:07 +0000 (23:41 +0000)
to open stderr successfully.  By using ap_log_perror, we can pass a valid
pool down to log_error_core

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87561 13f79535-47bb-0310-9956-ffa450edef68

server/log.c

index df4196ee2c45fba77e7bceef6c36819bc843f004..bd167872ccb45a02c13c1deaf033b74522781e18 100644 (file)
@@ -346,7 +346,7 @@ static void log_error_core(const char *file, int line, int level,
        if (((level & APLOG_LEVELMASK) != APLOG_NOTICE) &&
            ((level & APLOG_LEVELMASK) > DEFAULT_LOGLEVEL))
            return;
-       apr_open_stderr(&logf, NULL);
+       apr_open_stderr(&logf, pool);
     }
     else if (s->error_log) {
        /*
@@ -526,7 +526,7 @@ void ap_log_pid(apr_pool_t *p, const char *fname)
        *      that may screw up scripts written to do something
        *      based on the last modification time of the pid file.
        */
-        ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, 0, NULL,
+        ap_log_perror(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, 0, p,
                     apr_psprintf(p,
                                  "pid file %s overwritten -- Unclean shutdown of previous Apache run?",
                      fname)