Return-Path: X-Original-To: apmail-apr-commits-archive@www.apache.org Delivered-To: apmail-apr-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E6B21D69E for ; Sat, 3 Nov 2012 19:13:21 +0000 (UTC) Received: (qmail 13712 invoked by uid 500); 3 Nov 2012 19:13:21 -0000 Delivered-To: apmail-apr-commits-archive@apr.apache.org Received: (qmail 13659 invoked by uid 500); 3 Nov 2012 19:13:21 -0000 Mailing-List: contact commits-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: Reply-To: dev@apr.apache.org List-Id: Delivered-To: mailing list commits@apr.apache.org Received: (qmail 13647 invoked by uid 99); 3 Nov 2012 19:13:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 Nov 2012 19:13:21 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 Nov 2012 19:13:20 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 3FEA923888CD for ; Sat, 3 Nov 2012 19:13:00 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1405404 - in /apr/apr/branches/1.4.x: include/apr_network_io.h network_io/unix/sockopt.c Date: Sat, 03 Nov 2012 19:13:00 -0000 To: commits@apr.apache.org From: trawick@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121103191300.3FEA923888CD@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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);