Return-Path: Delivered-To: apmail-apr-cvs-archive@apr.apache.org Received: (qmail 30633 invoked by uid 500); 7 Jun 2002 21:17:21 -0000 Mailing-List: contact cvs-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: dev@apr.apache.org Delivered-To: mailing list cvs@apr.apache.org Received: (qmail 30622 invoked from network); 7 Jun 2002 21:17:21 -0000 Date: 7 Jun 2002 21:17:20 -0000 Message-ID: <20020607211720.40815.qmail@icarus.apache.org> From: bnicholes@apache.org To: apr-cvs@apache.org Subject: cvs commit: apr/include apr.hnw X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N bnicholes 2002/06/07 14:17:19 Modified: network_io/win32 sockets.c include apr.hnw Log: Allows the internal socket netmask of the accepted socket to initialize itself correctly based on the inherited options of the parent socket. This fixes a blocking vs. non-blocking problem in NetWare due to the changes in apr_setsockopt() and apr_getsockopt(). Windows may also need to correctly define APR_TCP_NODELAY_INHERITED and APR_O_NONBLOCK_INHERITED Revision Changes Path 1.77 +11 -0 apr/network_io/win32/sockets.c Index: sockets.c =================================================================== RCS file: /home/cvs/apr/network_io/win32/sockets.c,v retrieving revision 1.76 retrieving revision 1.77 diff -u -r1.76 -r1.77 --- sockets.c 4 Jun 2002 04:50:44 -0000 1.76 +++ sockets.c 7 Jun 2002 21:17:19 -0000 1.77 @@ -247,6 +247,17 @@ (*new)->local_port_unknown = 1; } +#if APR_TCP_NODELAY_INHERITED + if (apr_is_option_set(sock->netmask, APR_TCP_NODELAY) == 1) { + apr_set_option(&(*new)->netmask, APR_TCP_NODELAY, 1); + } +#endif /* TCP_NODELAY_INHERITED */ +#if APR_O_NONBLOCK_INHERITED + if (apr_is_option_set(sock->netmask, APR_SO_NONBLOCK) == 1) { + apr_set_option(&(*new)->netmask, APR_SO_NONBLOCK, 1); + } +#endif /* APR_O_NONBLOCK_INHERITED */ + if (sock->local_interface_unknown || !memcmp(sock->local_addr->ipaddr_ptr, generic_inaddr_any, 1.16 +8 -0 apr/include/apr.hnw Index: apr.hnw =================================================================== RCS file: /home/cvs/apr/include/apr.hnw,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- apr.hnw 31 May 2002 17:11:47 -0000 1.15 +++ apr.hnw 7 Jun 2002 21:17:19 -0000 1.16 @@ -219,6 +219,14 @@ */ #define APR_CHARSET_EBCDIC 0 +/* Is the TCP_NODELAY socket option inherited from listening sockets? +*/ +#define APR_TCP_NODELAY_INHERITED 1 + +/* Is the O_NONBLOCK flag inherited from listening sockets? +*/ +#define APR_O_NONBLOCK_INHERITED 1 + /* Typedefs that APR needs. */ typedef unsigned char apr_byte_t;