Commit ce06aae2 authored by Jeff Trawick's avatar Jeff Trawick
Browse files

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
parent b116688e
Loading
Loading
Loading
Loading
+3 −2
Changes for modules/http/http_core.c: 3 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -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;
	}