httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: apache-1.3/src/os/win32 service.c
Date Tue, 27 Mar 2001 19:18:14 GMT
wrowe       01/03/27 11:18:14

  Modified:    src/os/win32 service.c
  Log:
    Resolve the stdcall/cdecl ambiguity that caused Win2K to crash with the
    set service description patch.  Also lighten the load (don't allocate
    a handle) to get at the advapi32.dll we already statically link to.
  
  PR:		7471
  Submitted by:	Roman Neuhauser <cynic@mail.cz>
  
  Revision  Changes    Path
  1.53      +2 -4      apache-1.3/src/os/win32/service.c
  
  Index: service.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/os/win32/service.c,v
  retrieving revision 1.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- service.c	2001/03/26 19:25:53	1.52
  +++ service.c	2001/03/27 19:18:14	1.53
  @@ -698,7 +698,7 @@
   
   /* ChangeServiceConfig2() prototype:
    */
  -typedef WINADVAPI BOOL (*CSD_T)(SC_HANDLE, DWORD, LPCVOID);
  +typedef WINADVAPI BOOL (WINAPI *CSD_T)(SC_HANDLE, DWORD, LPCVOID);
   
   
   /* Windows 2000 alone supports ChangeServiceConfig2 in order to
  @@ -727,7 +727,7 @@
       /* Time to fix up the description, upon each successful restart
        */
       full_description = ap_get_server_version();
  -    hwin2000scm = LoadLibrary("ADVAPI32.DLL");
  +    hwin2000scm = GetModuleHandle("ADVAPI32.DLL");
       if (!hwin2000scm) {
           set_service_description_string(full_description);
           return;
  @@ -735,7 +735,6 @@
       ChangeServiceDescription = (CSD_T) GetProcAddress(hwin2000scm, 
                                                         "ChangeServiceConfig2A");
       if (!ChangeServiceDescription) {
  -        FreeLibrary(hwin2000scm);
           set_service_description_string(full_description);
           return;
       }
  @@ -753,7 +752,6 @@
       }
       if (!ret)
           set_service_description_string(full_description);
  -    FreeLibrary(hwin2000scm);
   }
   
   
  
  
  

Mime
View raw message