manoj       99/10/25 22:29:40

  Modified:    src/os/unix iol_socket.c
  Log:
  Fix bugs in the big fat macro.
  
  Revision  Changes    Path
  1.9       +4 -3      apache-2.0/src/os/unix/iol_socket.c
  
  Index: iol_socket.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/os/unix/iol_socket.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -d -u -r1.8 -r1.9
  --- iol_socket.c      1999/10/25 21:01:08     1.8
  +++ iol_socket.c      1999/10/26 05:29:40     1.9
  @@ -148,6 +148,7 @@
            rv = select(iol->fd + 1, selread, selwrite, NULL, iol->timeout < 0 
? NULL : &tv); \
        } while (rv == -1 && errno == EINTR); \
        if (!FD_ISSET(iol->fd, &fdset)) { \
  +            *nbytes = 0; \
            return APR_ETIMEDOUT; \
        } \
        do { \
  @@ -190,12 +191,12 @@
        do { \
            rv = syscall(iol->fd, arg1, arg2); \
        } while (rv == -1 && errno == EINTR); \
  -     if ((errno == EWOULDBLOCK || errno == EAGAIN) && iol->timeout != 0) { \
  -         return unix_##name##_timeout(viol, arg1, arg2, nbytes); \
  -     } \
        if (rv >= 0) { \
            *nbytes = rv; \
               return APR_SUCCESS; \
  +     } \
  +     if ((errno == EWOULDBLOCK || errno == EAGAIN) && iol->timeout != 0) { \
  +         return unix_##name##_timeout(viol, arg1, arg2, nbytes); \
        } \
        return errno; \
       }
  
  
  

Reply via email to