apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r1405403 - in /apr/apr/branches/1.5.x: include/apr_network_io.h network_io/unix/sockopt.c
Date Sat, 03 Nov 2012 19:08:01 GMT
Author: trawick
Date: Sat Nov  3 19:08:00 2012
New Revision: 1405403

URL: http://svn.apache.org/viewvc?rev=1405403&view=rev
Log:
corresponding roughly to trunk r1405402:

add apr_socket_accept_filter() notes on the name and args parameters,
which should have been declared as const char *


Modified:
    apr/apr/branches/1.5.x/include/apr_network_io.h
    apr/apr/branches/1.5.x/network_io/unix/sockopt.c

Modified: apr/apr/branches/1.5.x/include/apr_network_io.h
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.5.x/include/apr_network_io.h?rev=1405403&r1=1405402&r2=1405403&view=diff
==============================================================================
--- apr/apr/branches/1.5.x/include/apr_network_io.h (original)
+++ apr/apr/branches/1.5.x/include/apr_network_io.h Sat Nov  3 19:08:00 2012
@@ -758,6 +758,8 @@ APR_DECLARE(int) apr_ipsubnet_test(apr_i
  * @param name The accept filter
  * @param args Any extra args to the accept filter.  Passing NULL here removes
  *             the accept filter. 
+ * @bug name and args should have been declared as const char *, as they are in
+ * APR 2.0
  */
 apr_status_t apr_socket_accept_filter(apr_socket_t *sock, char *name,
                                       char *args);

Modified: apr/apr/branches/1.5.x/network_io/unix/sockopt.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.5.x/network_io/unix/sockopt.c?rev=1405403&r1=1405402&r2=1405403&view=diff
==============================================================================
--- apr/apr/branches/1.5.x/network_io/unix/sockopt.c (original)
+++ apr/apr/branches/1.5.x/network_io/unix/sockopt.c Sat Nov  3 19:08:00 2012
@@ -393,9 +393,13 @@ apr_status_t apr_gethostname(char *buf, 
 }
 
 #if APR_HAS_SO_ACCEPTFILTER
-apr_status_t apr_socket_accept_filter(apr_socket_t *sock, char *name, 
-                                      char *args)
+apr_status_t apr_socket_accept_filter(apr_socket_t *sock, char *nonconst_name, 
+                                      char *nonconst_args)
 {
+    /* these should have been const; act like they are */
+    const char *name = nonconst_name;
+    const char *args = nonconst_args;
+
     struct accept_filter_arg af;
     strncpy(af.af_name, name, 16);
     strncpy(af.af_arg, args, 256 - 16);



Mime
View raw message