From: Jeff Trawick Date: Sat, 3 Nov 2012 19:20:47 +0000 (+0000) Subject: revert r1401448 and add a comment on why there's a bewildering copy X-Git-Tag: 2.5.0-alpha~6166 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=766eabd7d9e08235fdb1d290c596e19524990e72;p=apache 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 --- diff --git a/server/listen.c b/server/listen.c index 29b2a1f774..7950a10039 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",