> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: 04 January 2002 18:26
> To: [EMAIL PROTECTED]
> Subject: cvs commit: apr/network_io/win32 sockets.c
> 
> 
> bnicholes    02/01/04 09:25:49
> 
>   Modified:    network_io/win32 sockets.c
>   Log:
>   Deferred the memory allocation for the new apr_socket_t until after the 
> accept()
>   call so that we don't chew up huge chunks of memory when using non-blocking
>   sockets and also avoiding unnecessary memory allocations on error 
> conditions.
>   
>   Revision  Changes    Path
>   1.69      +13 -7     apr/network_io/win32/sockets.c
>   
>   Index: sockets.c
>   ===================================================================
>   RCS file: /home/cvs/apr/network_io/win32/sockets.c,v
>   retrieving revision 1.68
>   retrieving revision 1.69
>   diff -u -r1.68 -r1.69
>   --- sockets.c       7 Dec 2001 23:29:07 -0000       1.68
>   +++ sockets.c       4 Jan 2002 17:25:49 -0000       1.69
>   @@ -226,20 +226,26 @@
>    APR_DECLARE(apr_status_t) apr_accept(apr_socket_t **new, apr_socket_t 
> *sock,
>                                         apr_pool_t *p)
>    {
>   +    SOCKET s;
>   +    struct sockaddr sa;
>   +    int salen = sizeof(sock->remote_addr->sa);
>   +
>   +    // Don't allocate the memory until after we call accept. This allows
>   +    //  us to work with nonblocking sockets.
         ^^

Can we lose the c++ style comments?

Sander 'being a pain in the butt today' Striker

Reply via email to