apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stodd...@apache.org
Subject cvs commit: apr/network_io/win32 sendrecv.c
Date Wed, 22 May 2002 20:06:32 GMT
stoddard    02/05/22 13:06:32

  Modified:    network_io/win32 sendrecv.c
  Log:
  Win32:  WTF was I thinking with that last commit? this is right (I hope :-)
  
  Revision  Changes    Path
  1.53      +10 -12    apr/network_io/win32/sendrecv.c
  
  Index: sendrecv.c
  ===================================================================
  RCS file: /home/cvs/apr/network_io/win32/sendrecv.c,v
  retrieving revision 1.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- sendrecv.c	22 May 2002 19:11:31 -0000	1.52
  +++ sendrecv.c	22 May 2002 20:06:32 -0000	1.53
  @@ -337,19 +337,17 @@
                                            (DWORD)(sock->timeout >= 0 
                                                    ? sock->timeout : INFINITE));
                   if (rv == WAIT_OBJECT_0) {
  -                    if (!disconnected && !GetOverlappedResult(wait_event, &overlapped,
  -                                                              &nbytes, FALSE)) {
  -                        status = APR_FROM_OS_ERROR(GetLastError());
  -                    }
  -                    else {
  -                        status = APR_SUCCESS;
  -                        /* Ugly Code Alert:
  -                         * Account for the fact that GetOverlappedResult
  -                         * tracks bytes sent in headers, trailers and the file 
  -                         * and this loop only needs to track bytes sent out 
  -                         * of the file.
  +                    status = APR_SUCCESS;
  +                    if (!disconnected) {
  +                        if (!GetOverlappedResult(wait_event, &overlapped, 
  +                                                 &nbytes, FALSE)) {
  +                            status = APR_FROM_OS_ERROR(GetLastError());
  +                        }
  +                        /* Ugly code alert: GetOverlappedResult returns
  +                         * a count of all bytes sent. This loop only
  +                         * tracks bytes sent out of the file.
                            */
  -                        if (ptfb) {
  +                        else if (ptfb) {
                               nbytes -= (ptfb->HeadLength + ptfb->TailLength);
                           }
                       }
  
  
  

Mime
View raw message