From a42f3692b1b975ba05a8e678bafe463707e7e5df Mon Sep 17 00:00:00 2001 From: Joe Orton Date: Thu, 23 Apr 2020 08:26:26 +0000 Subject: Add optional options= argument to Listen to add listener-specific socket options. Reimplement "use_specific_errors" listener flag under generic ap_listen_rec flags field holding all listener-specific options. * include/ap_listen.h: Add AP_LISTEN_* flags. (ap_listen_rec): Rename use_specific_errors to flags. * server/listen.c (make_sock): Set APR_SO_FREEBIND if AP_LISTEN_FREEBIND flag is set on listener; set APR_SO_REUSEPORT unconditionally if AP_LISTEN_REUSEPORT is set. (alloc_listener): Take flags argument. (ap_setup_listeners): Set AP_LISTEN_SPECIFIC_ERRORS flag here. (ap_set_listener): Parse optional options=... argument, catch typos and fail if protocol name contains a "=". (ap_duplicate_listeners): Duplicate flags. Submitted by: jkaluza, Lubos Uhliarik , jorton PR: 61865 Github: closes #114 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876865 13f79535-47bb-0310-9956-ffa450edef68 --- os/unix/unixd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'os') diff --git a/os/unix/unixd.c b/os/unix/unixd.c index bde859022b..3b0e695727 100644 --- a/os/unix/unixd.c +++ b/os/unix/unixd.c @@ -323,7 +323,7 @@ AP_DECLARE(apr_status_t) ap_unixd_accept(void **accepted, ap_listen_rec *lr, } /* Let the caller handle slightly more varied return values */ - if (lr->use_specific_errors && ap_accept_error_is_nonfatal(status)) { + if ((lr->flags & AP_LISTEN_SPECIFIC_ERRORS) && ap_accept_error_is_nonfatal(status)) { return status; } -- cgit v1.2.1