]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Follow-up to r1539988:
authorJeff Trawick <trawick@apache.org>
Wed, 20 Nov 2013 22:54:37 +0000 (22:54 +0000)
committerJeff Trawick <trawick@apache.org>
Wed, 20 Nov 2013 22:54:37 +0000 (22:54 +0000)
Make sure an error log provider has initialized before trying to log to it.
(A log function may be called in a window between closing stderr and opening logs.)

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

server/log.c

index a06b9f794dd5d145ae70d0611e568374049cb1ae..fc027196a1cba610047273a1e0cd824ca7a3dec0 100644 (file)
@@ -1118,11 +1118,12 @@ static void log_error_core(const char *file, int line, int module_index,
         }
     }
 
-    if (!logf && !errorlog_provider) {
+    if (!logf && !(errorlog_provider && errorlog_provider_handle)) {
         /* There is no file to send the log message to (or it is
          * redirected to /dev/null and therefore any formating done below
-         * would be lost anyway) and there is no log provider available, so
-         * we just return here. */
+         * would be lost anyway) and there is no initialized log provider
+         * available, so we just return here.
+         */
         return;
     }