You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by tr...@apache.org on 2012/11/03 20:13:00 UTC
svn commit: r1405404 - in /apr/apr/branches/1.4.x: include/apr_network_io.h
network_io/unix/sockopt.c
Author: trawick
Date: Sat Nov 3 19:12:59 2012
New Revision: 1405404
URL: http://svn.apache.org/viewvc?rev=1405404&view=rev
Log:
merge r1405403 from 1.5.x branch (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.4.x/include/apr_network_io.h
apr/apr/branches/1.4.x/network_io/unix/sockopt.c
Modified: apr/apr/branches/1.4.x/include/apr_network_io.h
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.4.x/include/apr_network_io.h?rev=1405404&r1=1405403&r2=1405404&view=diff
==============================================================================
--- apr/apr/branches/1.4.x/include/apr_network_io.h (original)
+++ apr/apr/branches/1.4.x/include/apr_network_io.h Sat Nov 3 19:12:59 2012
@@ -756,6 +756,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.4.x/network_io/unix/sockopt.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.4.x/network_io/unix/sockopt.c?rev=1405404&r1=1405403&r2=1405404&view=diff
==============================================================================
--- apr/apr/branches/1.4.x/network_io/unix/sockopt.c (original)
+++ apr/apr/branches/1.4.x/network_io/unix/sockopt.c Sat Nov 3 19:12:59 2012
@@ -381,9 +381,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);