From 766eabd7d9e08235fdb1d290c596e19524990e72 Mon Sep 17 00:00:00 2001 From: Jeff Trawick Date: Sat, 3 Nov 2012 19:20:47 +0000 Subject: [PATCH] revert r1401448 and add a comment on why there's a bewildering copy of args passed to apr_socket_accept_filter() git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1405407 13f79535-47bb-0310-9956-ffa450edef68 --- server/listen.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/listen.c b/server/listen.c index 29b2a1f7746..7950a10039f 100644 --- a/server/listen.c +++ b/server/listen.c @@ -213,7 +213,11 @@ static void ap_apply_accept_filter(apr_pool_t *p, ap_listen_rec *lis, if (accf) { #if APR_HAS_SO_ACCEPTFILTER - rv = apr_socket_accept_filter(s, accf, ""); + /* In APR 1.x, the 2nd and 3rd parameters are char * instead of + * const char *, so make a copy of those args here. + */ + rv = apr_socket_accept_filter(s, apr_pstrdup(p, accf), + apr_pstrdup(p, "")); if (rv != APR_SUCCESS && !APR_STATUS_IS_ENOTIMPL(rv)) { ap_log_perror(APLOG_MARK, APLOG_WARNING, rv, p, APLOGNO(00075) "Failed to enable the '%s' Accept Filter", -- 2.47.2