You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@apache.org on 2012/11/03 20:20:48 UTC
svn commit: r1405407 - /httpd/httpd/trunk/server/listen.c
Author: trawick
Date: Sat Nov 3 19:20:47 2012
New Revision: 1405407
URL: http://svn.apache.org/viewvc?rev=1405407&view=rev
Log:
revert r1401448 and add a comment on why there's a bewildering copy
of args passed to apr_socket_accept_filter()
Modified:
httpd/httpd/trunk/server/listen.c
Modified: httpd/httpd/trunk/server/listen.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/listen.c?rev=1405407&r1=1405406&r2=1405407&view=diff
==============================================================================
--- httpd/httpd/trunk/server/listen.c (original)
+++ httpd/httpd/trunk/server/listen.c Sat Nov 3 19:20:47 2012
@@ -213,7 +213,11 @@ static void ap_apply_accept_filter(apr_p
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",