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 Mon, 20 May 2002 13:43:57 GMT
stoddard    02/05/20 06:43:57

  Modified:    .        CHANGES
               .        CHANGES
               network_io/win32 sendrecv.c
  Log:
  Win32: Call GetOverlappedResults to get the results of an async
  TransmitFile() else we may return APR_SUCCESS to a call that really
  failed.
  
  Revision  Changes    Path
  1.778     +3 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.777
  retrieving revision 1.778
  diff -u -r1.777 -r1.778
  --- CHANGES	20 May 2002 00:11:56 -0000	1.777
  +++ CHANGES	20 May 2002 13:43:56 -0000	1.778
  @@ -1,4 +1,7 @@
   Changes with Apache 2.0.37
  +  *) Win32: Fix bug in apr_sendfile() that caused incorrect operation
  +     of the %X, %b and %B logformat options. PR 8253, 8996.
  +     [Bill Stoddard]
   
     *) If content-encoding is already present, do not run deflate (PR 9222)
        [Kazuhisa ASADA <kaz@asada.sytes.net>]
  
  
  
  1.289     +5 -0      apr/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apr/CHANGES,v
  retrieving revision 1.288
  retrieving revision 1.289
  diff -u -r1.288 -r1.289
  --- CHANGES	18 May 2002 04:16:52 -0000	1.288
  +++ CHANGES	20 May 2002 13:43:57 -0000	1.289
  @@ -1,4 +1,9 @@
   Changes with APR b1
  +  *) Win32: Fix bug where apr_sendfile() was incorrectly returning
  +     APR_SUCCESS on a TransmitFile call that was interrupted by
  +     the client closing its end of the connection. Always call 
  +     GetOverlappedResults() to get results of async TransmitFile()
  +     completion notification. [Bill Stoddard] 
   
     *) Renamed APR_XtOffset -> APR_OFFSET and APR_XtOffsetOf -> APR_OFFSETOF.
        [Cliff Woolley]
  
  
  
  1.48      +15 -8     apr/network_io/win32/sendrecv.c
  
  Index: sendrecv.c
  ===================================================================
  RCS file: /home/cvs/apr/network_io/win32/sendrecv.c,v
  retrieving revision 1.47
  retrieving revision 1.48
  diff -u -r1.47 -r1.48
  --- sendrecv.c	27 Apr 2002 20:47:57 -0000	1.47
  +++ sendrecv.c	20 May 2002 13:43:57 -0000	1.48
  @@ -325,17 +325,24 @@
           if (!rv) {
               status = apr_get_netos_error();
               if (status == APR_FROM_OS_ERROR(ERROR_IO_PENDING)) {
  +                HANDLE event;
   #ifdef WAIT_FOR_EVENT
  -                rv = WaitForSingleObject(overlapped.hEvent, 
  -                                         (DWORD)(sock->timeout >= 0 
  -                                            ? sock->timeout : INFINITE));
  +                event = overlapped.hEvent;
   #else
  -                rv = WaitForSingleObject((HANDLE) sock->sock, 
  -                                         (DWORD)(sock->timeout >= 0 
  -                                            ? sock->timeout : INFINITE));
  +                event = (HANDLE) sock->sock;
   #endif
  -                if (rv == WAIT_OBJECT_0)
  -                    status = APR_SUCCESS;
  +                rv = WaitForSingleObject(event, 
  +                                         (DWORD)(sock->timeout >= 0 
  +                                                 ? sock->timeout : INFINITE));
  +                if (rv == WAIT_OBJECT_0) {
  +                    if (!GetOverlappedResult(event, &overlapped,
  +                                             &nbytes, FALSE)) {
  +                        status = APR_FROM_OS_ERROR(GetLastError());
  +                    }
  +                    else {
  +                        status = APR_SUCCESS;
  +                    }
  +                }
                   else if (rv == WAIT_TIMEOUT)
                       status = APR_FROM_OS_ERROR(WAIT_TIMEOUT);
                   else if (rv == WAIT_ABANDONED) {
  
  
  

Mime
View raw message