From 81a15da717903452efc4705fec0b30daa36758d6 Mon Sep 17 00:00:00 2001 From: Jeff Trawick Date: Wed, 29 Mar 2000 02:52:31 +0000 Subject: [PATCH] when logging a failure of ap_mmap_create(), pass the returned status to ap_log_rerror() instead of the current errno value git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84847 13f79535-47bb-0310-9956-ffa450edef68 --- modules/http/http_core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/http/http_core.c b/modules/http/http_core.c index b68372e939..2187a84797 100644 --- a/modules/http/http_core.c +++ b/modules/http/http_core.c @@ -2552,8 +2552,9 @@ static int default_handler(request_rec *r) && (!r->header_only || (d->content_md5 & 1))) { /* we need to protect ourselves in case we die while we've got the * file mmapped */ - if (ap_mmap_create(&mm, fd, 0, r->finfo.size, r->pool) != APR_SUCCESS){ - ap_log_rerror(APLOG_MARK, APLOG_CRIT, errno, r, + ap_status_t status; + if ((status = ap_mmap_create(&mm, fd, 0, r->finfo.size, r->pool)) != APR_SUCCESS) { + ap_log_rerror(APLOG_MARK, APLOG_CRIT, status, r, "default_handler: mmap failed: %s", r->filename); mm = NULL; } -- 2.50.1