httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stodd...@locus.apache.org
Subject cvs commit: apache-2.0/src/modules/mpm/winnt winnt.c
Date Fri, 14 Apr 2000 16:48:46 GMT
stoddard    00/04/14 09:48:46

  Modified:    src/modules/mpm/winnt winnt.c
  Log:
  Win32: Protect another chunk of code unique to Windows NT with an
  ap_oslevel check.
  
  Revision  Changes    Path
  1.52      +11 -8     apache-2.0/src/modules/mpm/winnt/winnt.c
  
  Index: winnt.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/winnt/winnt.c,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- winnt.c	2000/04/14 15:59:04	1.51
  +++ winnt.c	2000/04/14 16:48:45	1.52
  @@ -1470,15 +1470,18 @@
               ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, APR_SUCCESS, server_conf,
                            "Parent: BytesWritten = %d WSAProtocolInfo = %x20", BytesWritten,
*lpWSAProtocolInfo);
           }
  -        /* Now, send the AcceptEx completion port to the child */
  -        if (!DuplicateHandle(GetCurrentProcess(), AcceptExCompPort, 
  -                             pi.hProcess, &hDupedCompPort,  0,
  -                             TRUE, DUPLICATE_SAME_ACCESS)) {
  -            ap_log_error(APLOG_MARK, APLOG_CRIT, GetLastError(), server_conf,
  -                         "Parent: Unable to duplicate AcceptEx completion port. Shutting
down.");
  -            return -1;
  +        if (osver.dwPlatformId != VER_PLATFORM_WIN32_WINDOWS) {
  +            /* Now, send the AcceptEx completion port to the child */
  +            if (!DuplicateHandle(GetCurrentProcess(), AcceptExCompPort, 
  +                                 pi.hProcess, &hDupedCompPort,  0,
  +                                 TRUE, DUPLICATE_SAME_ACCESS)) {
  +                ap_log_error(APLOG_MARK, APLOG_CRIT, GetLastError(), server_conf,
  +                             "Parent: Unable to duplicate AcceptEx completion port. Shutting
down.");
  +                return -1;
  +            }
  +
  +            WriteFile(hPipeWrite, &hDupedCompPort, (DWORD) sizeof(hDupedCompPort),
&BytesWritten, (LPOVERLAPPED) NULL);
           }
  -        WriteFile(hPipeWrite, &hDupedCompPort, (DWORD) sizeof(hDupedCompPort), &BytesWritten,
(LPOVERLAPPED) NULL);
       }
   
       CloseHandle(hPipeRead);
  
  
  

Mime
View raw message