httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: httpd-2.0/server/mpm/winnt mpm_winnt.c
Date Fri, 17 Aug 2001 16:47:01 GMT
wrowe       01/08/17 09:47:01

  Modified:    server/mpm/winnt mpm_winnt.c
  Log:
    Ok, I didn't like the choices I made an hour or two ago.  Here are (IMHO)
    the most appropriate log levels (feel free to debate.)  OTOH, this patch
    fixes the problem with an apache -k start -n foo command simply exiting,
    when foo isn't installed.
  
  Revision  Changes    Path
  1.172     +16 -10    httpd-2.0/server/mpm/winnt/mpm_winnt.c
  
  Index: mpm_winnt.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/winnt/mpm_winnt.c,v
  retrieving revision 1.171
  retrieving revision 1.172
  diff -u -r1.171 -r1.172
  --- mpm_winnt.c	2001/08/17 15:28:33	1.171
  +++ mpm_winnt.c	2001/08/17 16:47:01	1.172
  @@ -1668,7 +1668,7 @@
        */
       if (!GetModuleFileName(NULL, fnbuf, sizeof(fnbuf))) {
           rv = apr_get_os_error();
  -        ap_log_error(APLOG_MARK,APLOG_EMERG, rv, NULL, 
  +        ap_log_error(APLOG_MARK,APLOG_CRIT, rv, NULL, 
                        "Failed to get the path of Apache.exe");
           exit(1);
       }
  @@ -1763,7 +1763,7 @@
           }
       }
   
  -    if (service_set == SERVICE_UNSET && running_as_service) {
  +    if (service_set == SERVICE_UNSET) {
           service_set = mpm_service_set_name(process->pool, &service_name,
                                              DEFAULT_SERVICE_NAME);
       }
  @@ -1772,7 +1772,7 @@
       {
           if (service_set == APR_SUCCESS) 
           {
  -            ap_log_error(APLOG_MARK,APLOG_EMERG, 0, NULL,
  +            ap_log_error(APLOG_MARK,APLOG_ERR, 0, NULL,
                    "%s: Service is already installed.", service_name);
               exit(1);
           }
  @@ -1789,18 +1789,24 @@
                                "\"%s\".", service_name);
               }
   	    else  {
  -                ap_log_error(APLOG_MARK,APLOG_WARN, rv, NULL,
  +                ap_log_error(APLOG_MARK,APLOG_WARNING, rv, NULL,
                                "No installed ConfigArgs for the service "
                                "\"%s\", using Apache defaults.", service_name);
   	    }
           }
           else
           {
  -            ap_log_error(APLOG_MARK,APLOG_EMERG, service_set, NULL,
  +            ap_log_error(APLOG_MARK,APLOG_ERR, service_set, NULL,
                    "No installed service named \"%s\".", service_name);
               exit(1);
           }
       }
  +    if (strcasecmp(signal_arg, "install") && service_set && service_set
!= SERVICE_UNSET) 
  +    {
  +        ap_log_error(APLOG_MARK,APLOG_ERR, service_set, NULL,
  +             "No installed service named \"%s\".", service_name);
  +        exit(1);
  +    }
       
       /* Track the args actually entered by the user.
        * These will be used for the -k install parameters, as well as
  @@ -1832,7 +1838,7 @@
       if (!strcasecmp(signal_arg, "runservice")
               && (osver.dwPlatformId == VER_PLATFORM_WIN32_NT)
               && (service_to_start_success != APR_SUCCESS)) {
  -        ap_log_error(APLOG_MARK,APLOG_EMERG, service_to_start_success, NULL, 
  +        ap_log_error(APLOG_MARK,APLOG_CRIT, service_to_start_success, NULL, 
                        "%s: Unable to start the service manager.",
                        service_name);
           exit(1);
  @@ -1910,7 +1916,7 @@
                */
               shutdown_event = CreateEvent(sa, FALSE, FALSE, signal_shutdown_name);
               if (!shutdown_event) {
  -                ap_log_error(APLOG_MARK, APLOG_EMERG, apr_get_os_error(), server_conf,
  +                ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), server_conf,
                                "Parent: Cannot create shutdown event %s", signal_shutdown_name);
                   CleanNullACL((void *)sa);
                   exit(1);
  @@ -1922,7 +1928,7 @@
               restart_event = CreateEvent(sa, FALSE, FALSE, signal_restart_name);
               if (!restart_event) {
                   CloseHandle(shutdown_event);
  -                ap_log_error(APLOG_MARK, APLOG_EMERG, apr_get_os_error(), server_conf,
  +                ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), server_conf,
                                "Parent: Cannot create restart event %s", signal_restart_name);
                   CleanNullACL((void *)sa);
                   exit(1);
  @@ -1940,7 +1946,7 @@
                   {
                       rv = mpm_service_to_start(&service_name);
                       if (rv != APR_SUCCESS) {
  -                        ap_log_error(APLOG_MARK,APLOG_EMERG, rv, server_conf,
  +                        ap_log_error(APLOG_MARK,APLOG_ERR, rv, server_conf,
                                        "%s: Unable to start the service manager.",
                                        service_name);
                           exit(1);
  @@ -2000,7 +2006,7 @@
       else { 
           /* Parent process */
           if (ap_setup_listeners(server_conf) < 1) {
  -            ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_EMERG, 0, s,
  +            ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, s,
                            "no listening sockets available, shutting down");
               return 1;
           }
  
  
  

Mime
View raw message