You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by bn...@apache.org on 2002/06/07 23:17:20 UTC

cvs commit: apr/include apr.hnw

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;