httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r1405407 - /httpd/httpd/trunk/server/listen.c
Date Sat, 03 Nov 2012 19:20:48 GMT
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",



Mime
View raw message