httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@locus.apache.org
Subject cvs commit: apache-2.0/src/modules/mpm/winnt mpm_winnt.c service.c
Date Thu, 01 Jun 2000 03:20:10 GMT
wrowe       00/05/31 20:20:09

  Modified:    src/modules/mpm/winnt mpm_winnt.c service.c
  Log:
    Just a few error cleanups for tonight.
  
  Revision  Changes    Path
  1.74      +12 -11    apache-2.0/src/modules/mpm/winnt/mpm_winnt.c
  
  Index: mpm_winnt.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/winnt/mpm_winnt.c,v
  retrieving revision 1.73
  retrieving revision 1.74
  diff -u -r1.73 -r1.74
  --- mpm_winnt.c	2000/05/31 15:28:51	1.73
  +++ mpm_winnt.c	2000/06/01 03:20:09	1.74
  @@ -1819,7 +1819,8 @@
           /* WARNING: There is an implict assumption here that the
            * executable resides in the ServerRoot!
            */
  -        ap_log_error(APLOG_MARK,APLOG_ERR, GetLastError(), NULL, 
  +        rv = GetLastError();
  +        ap_log_error(APLOG_MARK,APLOG_ERR, rv, NULL, 
                        "Failed to get the running module's file name");
           exit(1);
       }
  @@ -1923,14 +1924,14 @@
               rv = mpm_merge_service_args(process->pool, mpm_new_argv, 
                                           fixed_args);
               if (rv != APR_SUCCESS) {
  -                ap_log_error(APLOG_MARK,APLOG_ERR, rv, server_conf,
  +                ap_log_error(APLOG_MARK,APLOG_ERR, rv, NULL,
                                "%s: ConfigArgs are missing from the registry.",
                                display_name);
               }
           }
           else
           {
  -            ap_log_error(APLOG_MARK,APLOG_ERR, APR_BADARG, server_conf,
  +            ap_log_error(APLOG_MARK,APLOG_ERR, APR_BADARG, NULL,
                    "%s: No installed service by that name.", display_name);
               exit(1);
           }
  @@ -1939,7 +1940,7 @@
       {
           if (service_named == APR_SUCCESS) 
           {
  -            ap_log_error(APLOG_MARK,APLOG_ERR, APR_BADARG, server_conf,
  +            ap_log_error(APLOG_MARK,APLOG_ERR, APR_BADARG, NULL,
                    "%s: Service is already installed.", display_name);
               exit(1);
           }
  @@ -1970,8 +1971,8 @@
       if (!strcasecmp(signal_arg, "runservice")
               && (osver.dwPlatformId == VER_PLATFORM_WIN32_NT)
               && (service_to_start_success != APR_SUCCESS)) {
  -        ap_log_error(APLOG_MARK,APLOG_ERR, service_to_start_success, 
  -                     server_conf, "%s: Unable to start the service manager.",
  +        ap_log_error(APLOG_MARK,APLOG_ERR, service_to_start_success, NULL, 
  +                     "%s: Unable to start the service manager.",
                        display_name);
           exit(1);
       }
  @@ -2013,18 +2014,18 @@
        */
   
       if (!strcasecmp(signal_arg, "install")) {
  -        mpm_service_install(ptemp, inst_argc, inst_argv);
  -        exit(rv);
  +        rv = mpm_service_install(ptemp, inst_argc, inst_argv);
  +        exit (rv);
       }
   
       if (!strcasecmp(signal_arg, "start")) {
           rv = mpm_service_start(ptemp, inst_argc, inst_argv);
  -        exit(rv);
  +        exit (rv);
       }
   
       if (!strcasecmp(signal_arg, "restart")) {
           mpm_signal_service(ptemp, ap_pid_fname, 1);
  -        exit(0);
  +        exit (rv);
       }
   
       // TODO: This Stinks - but we needed the ap_pid_fname entry from 
  @@ -2146,7 +2147,7 @@
               const char *pidfile = ap_server_root_relative (pconf, ap_pid_fname);
   
               if (pidfile != NULL && unlink(pidfile) == 0) {
  -                ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO,APR_SUCCESS,
  +                ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, APR_SUCCESS,
                                server_conf, "removed PID file %s (pid=%ld)",
                                pidfile, GetCurrentProcessId());
               }
  
  
  
  1.16      +11 -6     apache-2.0/src/modules/mpm/winnt/service.c
  
  Index: service.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/winnt/service.c,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- service.c	2000/05/31 15:28:52	1.15
  +++ service.c	2000/06/01 03:20:09	1.16
  @@ -372,7 +372,8 @@
       if(!(globdat.hServiceStatus = RegisterServiceCtrlHandler(argv[0], service_nt_ctrl)))
       {
           ap_log_error(APLOG_MARK, APLOG_ERR, GetLastError(), NULL,
  -        "Failure registering service handler");
  +                     "Failure registering service handler");
  +        PulseEvent(globdat.signal_monitor);
           return;
       }
   
  @@ -432,7 +433,8 @@
           rv = GetLastError();
           ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL,
                        "Error starting service control dispatcher");
  -    };
  +    }
  +
       globdat.service_thread = 0;
       return (rv);
   }
  @@ -624,7 +626,8 @@
   
           if (!schService) 
           {
  -            ap_log_error(APLOG_MARK, APLOG_ERR, GetLastError(), NULL, 
  +            rv = GetLastError();
  +            ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL, 
                            "Failed to create WinNT Service Profile");
               CloseServiceHandle(schSCManager);
               return (rv);
  @@ -736,7 +739,9 @@
           
           /* we blast Services/us, not just the Services/us/Parameters branch */
           ap_snprintf(key_name, sizeof(key_name), SERVICECONFIG, service_name);
  -        if (ap_registry_delete_key(key_name)) {
  +        if (ap_registry_delete_key(key_name)) 
  +        {
  +            rv = GetLastError();
               ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL,
                            "%s: Failed to remove the service config from the "
                            "registry.", display_name);
  @@ -904,7 +909,7 @@
           }
           if (!readpid)
           {
  -            ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +            ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, 
                            "%s: could not retrieve pid from file %s",
   		         display_name, pid_file);
               return;
  @@ -912,7 +917,7 @@
       }
       else
       {
  -        ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, 
                        "%s: could not retrieve pid from file %s",
   		     display_name, pid_file);
           return;
  
  
  

Mime
View raw message