From: Jeff Trawick Date: Wed, 29 Mar 2000 02:52:31 +0000 (+0000) Subject: when logging a failure of ap_mmap_create(), pass the returned X-Git-Tag: APACHE_2_0_ALPHA_2~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=81a15da717903452efc4705fec0b30daa36758d6;p=thirdparty%2Fapache%2Fhttpd.git 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 --- diff --git a/modules/http/http_core.c b/modules/http/http_core.c index b68372e9396..2187a84797d 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; }