apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@apache.org
Subject cvs commit: apr/network_io/os2 sendrecv.c
Date Wed, 08 May 2002 08:33:11 GMT
bjh         02/05/08 01:33:10

  Modified:    network_io/os2 sendrecv.c
  Log:
  OS/2: Fix apr_recv() when timeout == 0.
  
  Revision  Changes    Path
  1.23      +2 -2      apr/network_io/os2/sendrecv.c
  
  Index: sendrecv.c
  ===================================================================
  RCS file: /home/cvs/apr/network_io/os2/sendrecv.c,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- sendrecv.c	13 Mar 2002 20:39:24 -0000	1.22
  +++ sendrecv.c	8 May 2002 08:33:10 -0000	1.23
  @@ -104,7 +104,7 @@
       int fds, err = 0;
   
       do {
  -        if (!sock->nonblock || err == SOCEWOULDBLOCK) {
  +        if (!sock->nonblock || (err == SOCEWOULDBLOCK && sock->timeout !=
0)) {
               fds = sock->socketdes;
               rv = select(&fds, 1, 0, 0, sock->timeout >= 0 ? sock->timeout/1000
: -1);
   
  @@ -124,7 +124,7 @@
   
           rv = recv(sock->socketdes, buf, (*len), 0);
           err = rv < 0 ? sock_errno() : 0;
  -    } while (err == SOCEINTR || err == SOCEWOULDBLOCK);
  +    } while (err == SOCEINTR || (err == SOCEWOULDBLOCK && sock->timeout != 0));
   
       if (err) {
           *len = 0;
  
  
  

Mime
View raw message