apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Woolley <cliffwool...@yahoo.com>
Subject Re: cvs commit: apr/network_io/unix sockets.c
Date Wed, 08 Aug 2001 00:37:21 GMT
On 8 Aug 2001 trawick@apache.org wrote:

> trawick     01/08/07 17:30:26
>
>   Modified:    network_io/unix sockets.c
>   Log:
>   get sockets.c to compile and fix a bug in the error path
>   from getsockopt()
>
>   (not tested... 2 yr old is begging for a walk :) )
>
>   Revision  Changes    Path
>   1.86      +3 -2      apr/network_io/unix/sockets.c
>
>   Index: sockets.c
>   ===================================================================
>   RCS file: /home/cvs/apr/network_io/unix/sockets.c,v
>   retrieving revision 1.85
>   retrieving revision 1.86
>   diff -u -r1.85 -r1.86
>   --- sockets.c	2001/08/07 23:56:35	1.85
>   +++ sockets.c	2001/08/08 00:30:17	1.86
>   @@ -275,12 +275,13 @@
>        if (rc == -1 && (errno == EINPROGRESS || errno == EALREADY) &&
sock->timeout != 0) {
>            int error;
>            apr_size_t len = sizeof(error);
>   +
>            rc = apr_wait_for_io_or_timeout(sock, 0);
>            if (rc != APR_SUCCESS) {
>                return rc;
>            }
>   -        if ((rc = getsockopt(sockfd, SOL_SOCKET, SO_ERROR, &error, &len))
< 0) {
>   -            return(rc);
>   +        if ((rc = getsockopt(sock->socketdes, SOL_SOCKET, SO_ERROR, &error,
&len)) < 0) {
>   +            return errno;
>            }
>            if (error) {
>                return error;
>

Looks good to me.  Tag bumped.

--Cliff

--------------------------------------------------------------
   Cliff Woolley
   cliffwoolley@yahoo.com
   Charlottesville, VA



Mime
View raw message