httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From i...@apache.org
Subject cvs commit: httpd-2.0/server config.c core.c main.c
Date Fri, 23 Nov 2001 16:35:22 GMT
ianh        01/11/23 08:35:22

  Modified:    .        CHANGES
               include  http_config.h
               modules/aaa mod_auth_digest.c
               modules/arch/netware mod_nw_ssl.c
               modules/arch/win32 mod_isapi.c
               modules/cache mod_file_cache.c
               modules/dav/main mod_dav.c
               modules/experimental mod_example.c
               modules/filters mod_include.c
               modules/generators mod_cgi.c mod_cgid.c mod_status.c
               modules/http mod_mime.c
               modules/mappers mod_rewrite.c mod_rewrite.h
               modules/metadata mod_mime_magic.c mod_unique_id.c
               modules/ssl mod_ssl.h ssl_engine_init.c
               server   config.c core.c main.c
  Log:
  Modify post_config hook so that it can return a error,
  causing the server not to start.
  previous method was to call exit(1) which would not fail
  gracefully
  
  Reviewed by:	(Idea only Jeff Trawick)
  
  Revision  Changes    Path
  1.453     +5 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.452
  retrieving revision 1.453
  diff -u -r1.452 -r1.453
  --- CHANGES	2001/11/22 20:32:24	1.452
  +++ CHANGES	2001/11/23 16:35:20	1.453
  @@ -1,5 +1,10 @@
   Changes with Apache 2.0.29-dev
   
  +
  +  *) Change post_config hook to return a value, allowing you
  +     to flag a error post config
  +     [Ian Holsman, Jeff Trawick]
  +
     *) Allow SUEXEC_BIN (the path to the suexec binary that is
        hard-coded into the server) to be specified to the configure
        script by the --with-suexec-bin parameter.  [Aaron Bannert]
  
  
  
  1.91      +2 -1      httpd-2.0/include/http_config.h
  
  Index: http_config.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/include/http_config.h,v
  retrieving revision 1.90
  retrieving revision 1.91
  diff -u -r1.90 -r1.91
  --- http_config.h	2001/11/18 06:30:55	1.90
  +++ http_config.h	2001/11/23 16:35:20	1.91
  @@ -979,8 +979,9 @@
    * @param plog The logging streams pool
    * @param ptemp The temporary pool
    * @param s The list of server_recs
  + * @return OK or a 
    */
  -AP_DECLARE_HOOK(void,post_config,(apr_pool_t *pconf,apr_pool_t *plog,apr_pool_t *ptemp,server_rec
*s))
  +AP_DECLARE_HOOK(int,post_config,(apr_pool_t *pconf,apr_pool_t *plog,apr_pool_t *ptemp,server_rec
*s))
   
   /**
    * Run the open_logs functions for each module
  
  
  
  1.52      +3 -2      httpd-2.0/modules/aaa/mod_auth_digest.c
  
  Index: mod_auth_digest.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/aaa/mod_auth_digest.c,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- mod_auth_digest.c	2001/08/19 16:01:03	1.51
  +++ mod_auth_digest.c	2001/11/23 16:35:21	1.52
  @@ -407,14 +407,14 @@
   #endif /* APR_HAS_SHARED_MEMORY */
   
   
  -static void initialize_module(apr_pool_t *p, apr_pool_t *plog,
  +static int initialize_module(apr_pool_t *p, apr_pool_t *plog,
   			      apr_pool_t *ptemp, server_rec *s)
   {
       /* keep from doing the init more than once at startup, and delay
        * the init until the second round
        */
       if (++call_cnt < 2)
  -	return;
  +	return OK;
   
       /* only initialize the secret on startup, not on restarts */
       if (call_cnt == 2)
  @@ -434,6 +434,7 @@
       initialize_tables(s, p);
       apr_pool_cleanup_register(p, NULL, cleanup_tables, apr_pool_cleanup_null);
   #endif	/* APR_HAS_SHARED_MEMORY */
  +    return OK;
   }
   
   static void initialize_child(apr_pool_t *p, server_rec *s)
  
  
  
  1.3       +4 -3      httpd-2.0/modules/arch/netware/mod_nw_ssl.c
  
  Index: mod_nw_ssl.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/arch/netware/mod_nw_ssl.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- mod_nw_ssl.c	2001/11/14 18:24:22	1.2
  +++ mod_nw_ssl.c	2001/11/23 16:35:21	1.3
  @@ -340,7 +340,7 @@
       ap_seclisteners = NULL;
   }
   
  -static void nwssl_post_config(apr_pool_t *pconf, apr_pool_t *plog,
  +static int nwssl_post_config(apr_pool_t *pconf, apr_pool_t *plog,
                             apr_pool_t *ptemp, server_rec *s)
   {
       seclisten_rec* sl;
  @@ -373,16 +373,17 @@
                                                 pconf)) != APR_SUCCESS) {
                       ap_log_perror(APLOG_MARK, APLOG_CRIT, status, pconf,
                                    "alloc_listener: failed to set up sockaddr for %s:%d",
sl->addr, sl->port);
  -                    exit(1);
  +                    return HTTP_INTERNAL_SERVER_ERROR;
                   }
                   lr->next = ap_listeners;
                   ap_listeners = lr;
                   apr_pool_cleanup_register(pconf, lr, nwssl_socket_cleanup, apr_pool_cleanup_null);
               }                        
           } else {
  -            exit(1);
  +            return HTTP_INTERNAL_SERVER_ERROR;
           }
       } 
  +    return OK;
   }
   
   static void *nwssl_config_server_create(apr_pool_t *p, server_rec *s)
  
  
  
  1.52      +2 -1      httpd-2.0/modules/arch/win32/mod_isapi.c
  
  Index: mod_isapi.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/arch/win32/mod_isapi.c,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- mod_isapi.c	2001/11/11 22:31:03	1.51
  +++ mod_isapi.c	2001/11/23 16:35:21	1.52
  @@ -213,7 +213,7 @@
       return strcmp((*a)->filename, (*b)->filename);
   }
   
  -static void isapi_post_config(apr_pool_t *p, apr_pool_t *plog,
  +static int isapi_post_config(apr_pool_t *p, apr_pool_t *plog,
                                 apr_pool_t *ptemp, server_rec *s)
   {
       isapi_server_conf *sconf = ap_get_module_config(s->module_config, 
  @@ -228,6 +228,7 @@
       for (s = s->next; s; s = s->next) {
   	ap_set_module_config(s->module_config, &isapi_module, sconf);
       }
  +    return OK;
   }
   
   static apr_status_t isapi_load(apr_pool_t *p, isapi_server_conf *sconf, 
  
  
  
  1.65      +2 -1      httpd-2.0/modules/cache/mod_file_cache.c
  
  Index: mod_file_cache.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/cache/mod_file_cache.c,v
  retrieving revision 1.64
  retrieving revision 1.65
  diff -u -r1.64 -r1.65
  --- mod_file_cache.c	2001/11/22 22:44:30	1.64
  +++ mod_file_cache.c	2001/11/23 16:35:21	1.65
  @@ -299,10 +299,11 @@
       return NULL;
   }
   
  -static void file_cache_post_config(apr_pool_t *p, apr_pool_t *plog,
  +static int file_cache_post_config(apr_pool_t *p, apr_pool_t *plog,
                                      apr_pool_t *ptemp, server_rec *s)
   {
       /* Hummm, anything to do here? */
  +    return OK;
   }
   
   /* If it's one of ours, fill in r->finfo now to avoid extra stat()... this is a
  
  
  
  1.65      +2 -1      httpd-2.0/modules/dav/main/mod_dav.c
  
  Index: mod_dav.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/dav/main/mod_dav.c,v
  retrieving revision 1.64
  retrieving revision 1.65
  diff -u -r1.64 -r1.65
  --- mod_dav.c	2001/11/11 22:31:03	1.64
  +++ mod_dav.c	2001/11/23 16:35:21	1.65
  @@ -132,12 +132,13 @@
   /* forward-declare for use in configuration lookup */
   extern module DAV_DECLARE_DATA dav_module;
   
  -static void dav_init_handler(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp,
  +static int dav_init_handler(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp,
                                server_rec *s)
   {
       /* DBG0("dav_init_handler"); */
   
       ap_add_version_component(p, "DAV/2");
  +    return OK;
   }
   
   static void *dav_create_server_config(apr_pool_t *p, server_rec *s)
  
  
  
  1.28      +2 -1      httpd-2.0/modules/experimental/mod_example.c
  
  Index: mod_example.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/experimental/mod_example.c,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- mod_example.c	2001/10/15 23:14:11	1.27
  +++ mod_example.c	2001/11/23 16:35:21	1.28
  @@ -864,13 +864,14 @@
    * server will still call any remaining modules with an handler for this
    * phase.
    */
  -static void x_post_config(apr_pool_t *pconf, apr_pool_t *plog,
  +static int x_post_config(apr_pool_t *pconf, apr_pool_t *plog,
                             apr_pool_t *ptemp, server_rec *s)
   {
       /*
        * Log the call and exit.
        */
       trace_add(NULL, NULL, NULL, "x_post_config()");
  +    return OK;
   }
   
   /*
  
  
  
  1.158     +2 -1      httpd-2.0/modules/filters/mod_include.c
  
  Index: mod_include.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/filters/mod_include.c,v
  retrieving revision 1.157
  retrieving revision 1.158
  diff -u -r1.157 -r1.158
  --- mod_include.c	2001/11/22 06:03:10	1.157
  +++ mod_include.c	2001/11/23 16:35:21	1.158
  @@ -3121,7 +3121,7 @@
       apr_hash_set(include_hash, tag, strlen(tag) + 1, (const void *)func);
   }
   
  -static void include_post_config(apr_pool_t *p, apr_pool_t *plog,
  +static int include_post_config(apr_pool_t *p, apr_pool_t *plog,
                                   apr_pool_t *ptemp, server_rec *s)
   {
       include_hash = apr_hash_make(p);
  @@ -3145,6 +3145,7 @@
           ssi_pfn_register("flastmod", handle_flastmod);
           ssi_pfn_register("printenv", handle_printenv);
       }
  +    return OK;
   }
   
   static const char *set_default_error_msg(cmd_parms *cmd, void *mconfig, const char *msg)
  
  
  
  1.111     +2 -1      httpd-2.0/modules/generators/mod_cgi.c
  
  Index: mod_cgi.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/generators/mod_cgi.c,v
  retrieving revision 1.110
  retrieving revision 1.111
  diff -u -r1.110 -r1.111
  --- mod_cgi.c	2001/11/12 16:32:33	1.110
  +++ mod_cgi.c	2001/11/23 16:35:21	1.111
  @@ -929,7 +929,7 @@
    *============================================================================*/
   
   
  -static void cgi_post_config(apr_pool_t *p, apr_pool_t *plog,
  +static int cgi_post_config(apr_pool_t *p, apr_pool_t *plog,
                                   apr_pool_t *ptemp, server_rec *s)
   {
       cgi_pfn_reg_with_ssi = APR_RETRIEVE_OPTIONAL_FN(ap_register_include_handler);
  @@ -950,6 +950,7 @@
       if (!cgi_build_command) {
           cgi_build_command = default_build_command;
       }
  +    return OK;
   }
   
   static void register_hooks(apr_pool_t *p)
  
  
  
  1.103     +3 -1      httpd-2.0/modules/generators/mod_cgid.c
  
  Index: mod_cgid.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/generators/mod_cgid.c,v
  retrieving revision 1.102
  retrieving revision 1.103
  diff -u -r1.102 -r1.103
  --- mod_cgid.c	2001/11/12 03:23:12	1.102
  +++ mod_cgid.c	2001/11/23 16:35:21	1.103
  @@ -587,7 +587,7 @@
       return -1; 
   } 
   
  -static void cgid_init(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, 
  +static int cgid_init(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, 
                         server_rec *main_server) 
   { 
       pid_t pid; 
  @@ -613,6 +613,7 @@
           if ((pid = fork()) < 0) {
               ap_log_error(APLOG_MARK, APLOG_ERR, errno, main_server, 
                            "Couldn't spawn cgid daemon process"); 
  +            /* XXX should we return a failure here ? */
           }
           else if (pid == 0) {
               apr_pool_create(&pcgi, p); 
  @@ -638,6 +639,7 @@
               cgid_pfn_reg_with_ssi("exec", handle_exec);
           }
       }
  +    return OK;
   } 
   
   static void *create_cgid_config(apr_pool_t *p, server_rec *s) 
  
  
  
  1.49      +2 -1      httpd-2.0/modules/generators/mod_status.c
  
  Index: mod_status.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/generators/mod_status.c,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- mod_status.c	2001/10/11 19:53:36	1.48
  +++ mod_status.c	2001/11/23 16:35:21	1.49
  @@ -767,7 +767,7 @@
   }
   
   
  -static void status_init(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec
*s)
  +static int status_init(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)
   {
       status_flags[SERVER_DEAD] = '.';	/* We don't want to assume these are in */
       status_flags[SERVER_READY] = '_';	/* any particular order in scoreboard.h */
  @@ -780,6 +780,7 @@
       status_flags[SERVER_CLOSING] = 'C';
       status_flags[SERVER_GRACEFUL] = 'G';
       status_flags[SERVER_IDLE_KILL] = 'I';
  +    return OK;
   }
   
   static void register_hooks(apr_pool_t *p)
  
  
  
  1.70      +3 -2      httpd-2.0/modules/http/mod_mime.c
  
  Index: mod_mime.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/http/mod_mime.c,v
  retrieving revision 1.69
  retrieving revision 1.70
  diff -u -r1.69 -r1.70
  --- mod_mime.c	2001/11/09 23:15:43	1.69
  +++ mod_mime.c	2001/11/23 16:35:21	1.70
  @@ -428,7 +428,7 @@
   
   static apr_hash_t *mime_type_extensions;
   
  -static void mime_post_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec
*s)
  +static int mime_post_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec
*s)
   {
       ap_configfile_t *f;
       char l[MAX_STRING_LEN];
  @@ -443,7 +443,7 @@
       if ((status = ap_pcfg_openfile(&f, ptemp, types_confname)) != APR_SUCCESS) {
           ap_log_error(APLOG_MARK, APLOG_ERR, status, s,
   		     "could not open mime types config file %s.", types_confname);
  -        exit(1);
  +        return HTTP_INTERNAL_SERVER_ERROR;
       }
   
       mime_type_extensions = apr_hash_make(p);
  @@ -462,6 +462,7 @@
           }
       }
       ap_cfg_closefile(f);
  +    return OK;
   }
   
   static char *zap_sp(char *s)
  
  
  
  1.90      +3 -2      httpd-2.0/modules/mappers/mod_rewrite.c
  
  Index: mod_rewrite.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/mappers/mod_rewrite.c,v
  retrieving revision 1.89
  retrieving revision 1.90
  diff -u -r1.89 -r1.90
  --- mod_rewrite.c	2001/11/19 15:27:39	1.89
  +++ mod_rewrite.c	2001/11/23 16:35:22	1.90
  @@ -920,7 +920,7 @@
   **
   */
   
  -static void init_module(apr_pool_t *p,
  +static int init_module(apr_pool_t *p,
                           apr_pool_t *plog,
                           apr_pool_t *ptemp,
                           server_rec *s)
  @@ -945,7 +945,7 @@
                                  NULL, p)) != APR_SUCCESS) {
           ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s,
                        "mod_rewrite: could not create rewrite_log_lock");
  -        exit(1);
  +        return HTTP_INTERNAL_SERVER_ERROR;
       }
   
       rewritelock_create(s, p);
  @@ -960,6 +960,7 @@
           if (!first_time)
              run_rewritemap_programs(s, p);
       }
  +    return OK;
   }
   
   
  
  
  
  1.28      +1 -1      httpd-2.0/modules/mappers/mod_rewrite.h
  
  Index: mod_rewrite.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/mappers/mod_rewrite.h,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- mod_rewrite.h	2001/11/14 08:03:18	1.27
  +++ mod_rewrite.h	2001/11/23 16:35:22	1.28
  @@ -385,7 +385,7 @@
                                              char *key, char *val);
   
       /* initialisation */
  -static void init_module(apr_pool_t *p,
  +static int init_module(apr_pool_t *p,
                           apr_pool_t *plog,
                           apr_pool_t *ptemp,
                           server_rec *s);
  
  
  
  1.50      +3 -2      httpd-2.0/modules/metadata/mod_mime_magic.c
  
  Index: mod_mime_magic.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/metadata/mod_mime_magic.c,v
  retrieving revision 1.49
  retrieving revision 1.50
  diff -u -r1.49 -r1.50
  --- mod_mime_magic.c	2001/10/27 13:36:57	1.49
  +++ mod_mime_magic.c	2001/11/23 16:35:22	1.50
  @@ -2395,7 +2395,7 @@
   /*
    * initialize the module
    */
  -static void magic_init(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *main_server)
  +static int magic_init(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *main_server)
   {
       int result;
       magic_server_config_rec *conf;
  @@ -2415,7 +2415,7 @@
   	else if (conf->magicfile) {
   	    result = apprentice(s, p);
   	    if (result == -1)
  -		return;
  +		return OK;
   #if MIME_MAGIC_DEBUG
   	    prevm = 0;
   	    ap_log_error(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, 0, s,
  @@ -2440,6 +2440,7 @@
   #endif
   	}
       }
  +    return OK;
   }
   
   /*
  
  
  
  1.34      +4 -3      httpd-2.0/modules/metadata/mod_unique_id.c
  
  Index: mod_unique_id.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/metadata/mod_unique_id.c,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- mod_unique_id.c	2001/11/21 16:22:05	1.33
  +++ mod_unique_id.c	2001/11/23 16:35:22	1.34
  @@ -172,7 +172,7 @@
                         unique_id_rec_total_size,
                         unique_id_rec_size_uu;
   
  -static void unique_id_global_init(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec
*main_server)
  +static int unique_id_global_init(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec
*main_server)
   {
       char str[APRMAXHOSTLEN + 1];
       apr_short_interval_time_t pause;
  @@ -210,7 +210,7 @@
       if ((rv = apr_gethostname(str, sizeof(str) - 1, p)) != APR_SUCCESS) {
           ap_log_error(APLOG_MARK, APLOG_ALERT, rv, main_server,
             "mod_unique_id: unable to find hostname of the server");
  -        exit(1);
  +        return HTTP_INTERNAL_SERVER_ERROR;
       }
   
       /* XXX theoretically there are boxes out there which want to use
  @@ -219,7 +219,7 @@
       if ((rv = apr_sockaddr_info_get(&sockaddr, str, AF_INET, 0, 0, p)) != APR_SUCCESS)
{
           ap_log_error(APLOG_MARK, APLOG_ALERT, rv, main_server,
                       "mod_unique_id: unable to find IPv4 address of \"%s\"", str);
  -        exit(1);
  +        return HTTP_INTERNAL_SERVER_ERROR;
       }
   
       global_in_addr = sockaddr->sa.sin.sin_addr.s_addr;
  @@ -244,6 +244,7 @@
        */
       pause = (apr_short_interval_time_t)(1000000 - (apr_time_now() % APR_USEC_PER_SEC));
       apr_sleep(pause);
  +    return OK;
   }
   
   static void unique_id_child_init(apr_pool_t *p, server_rec *s)
  
  
  
  1.43      +1 -1      httpd-2.0/modules/ssl/mod_ssl.h
  
  Index: mod_ssl.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/ssl/mod_ssl.h,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- mod_ssl.h	2001/11/22 02:44:35	1.42
  +++ mod_ssl.h	2001/11/23 16:35:22	1.43
  @@ -605,7 +605,7 @@
   #endif
   
   /*  module initialization  */
  -void         ssl_init_Module(apr_pool_t *, apr_pool_t *, apr_pool_t *, server_rec *);
  +int          ssl_init_Module(apr_pool_t *, apr_pool_t *, apr_pool_t *, server_rec *);
   void         ssl_init_SSLLibrary(void);
   void         ssl_init_Engine(server_rec *, apr_pool_t *);
   void         ssl_init_TmpKeysHandle(int, server_rec *, apr_pool_t *);
  
  
  
  1.16      +3 -3      httpd-2.0/modules/ssl/ssl_engine_init.c
  
  Index: ssl_engine_init.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/ssl/ssl_engine_init.c,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- ssl_engine_init.c	2001/11/21 22:58:28	1.15
  +++ ssl_engine_init.c	2001/11/23 16:35:22	1.16
  @@ -70,7 +70,7 @@
   /*
    *  Per-module initialization
    */
  -void ssl_init_Module(apr_pool_t *p, apr_pool_t *plog,
  +int ssl_init_Module(apr_pool_t *p, apr_pool_t *plog,
       apr_pool_t *ptemp, server_rec *s)
   {
       SSLModConfigRec *mc = myModConfig(s);
  @@ -191,7 +191,7 @@
       if (mc->nInitCount == 1) {
           ssl_pphrase_Handle(s, p);
           ssl_init_TmpKeysHandle(SSL_TKP_GEN, s, p);
  -        return;
  +        return OK;
       }
   
       /*
  @@ -265,7 +265,7 @@
       ap_add_version_component(p, ssl_var_lookup(p, s, NULL, NULL, "SSL_VERSION_LIBRARY"));
   
       SSL_init_app_data2_idx(); /* for SSL_get_app_data2() at request time */
  -    return;
  +    return OK;
   }
   
   /*
  
  
  
  1.138     +4 -4      httpd-2.0/server/config.c
  
  Index: config.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/config.c,v
  retrieving revision 1.137
  retrieving revision 1.138
  diff -u -r1.137 -r1.138
  --- config.c	2001/11/23 10:56:31	1.137
  +++ config.c	2001/11/23 16:35:22	1.138
  @@ -121,9 +121,9 @@
   AP_IMPLEMENT_HOOK_VOID(pre_config,
   		       (apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp),
                          (pconf,plog,ptemp))
  -AP_IMPLEMENT_HOOK_VOID(post_config,
  +AP_IMPLEMENT_HOOK_RUN_ALL(int,post_config,
   		       (apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp,
  -                        server_rec *s),(pconf,plog,ptemp,s))
  +                        server_rec *s),(pconf,plog,ptemp,s),OK,DECLINED)
   /* During the course of debugging I expanded this macro out, so
    * rather than remove all the useful information there is in the
    * following lines, I'm going to leave it here in case anyone
  @@ -131,7 +131,7 @@
    *
    * Ben has looked at it and thinks it correct :)
    *
  -AP_DECLARE(void) ap_hook_post_config(ap_HOOK_post_config_t *pf,
  +AP_DECLARE(int) ap_hook_post_config(ap_HOOK_post_config_t *pf,
                                        const char * const *aszPre,
                                        const char * const *aszSucc,
                                        int nOrder)
  @@ -159,7 +159,7 @@
       return _hooks.link_post_config;
   }
   
  -AP_DECLARE(void) ap_run_post_config (apr_pool_t *pconf,
  +AP_DECLARE(int) ap_run_post_config (apr_pool_t *pconf,
                                        apr_pool_t *plog,
                                        apr_pool_t *ptemp,
                                        server_rec *s)
  
  
  
  1.103     +2 -1      httpd-2.0/server/core.c
  
  Index: core.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/core.c,v
  retrieving revision 1.102
  retrieving revision 1.103
  diff -u -r1.102 -r1.103
  --- core.c	2001/11/21 18:25:40	1.102
  +++ core.c	2001/11/23 16:35:22	1.103
  @@ -3258,9 +3258,10 @@
       return APR_SUCCESS;
   }
   
  -static void core_post_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec
*s)
  +static int core_post_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec
*s)
   {
       ap_set_version(pconf);
  +    return OK;
   }
   
   static void core_open_logs(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec
*s)
  
  
  
  1.102     +8 -2      httpd-2.0/server/main.c
  
  Index: main.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/main.c,v
  retrieving revision 1.101
  retrieving revision 1.102
  diff -u -r1.101 -r1.102
  --- main.c	2001/09/28 15:24:34	1.101
  +++ main.c	2001/11/23 16:35:22	1.102
  @@ -397,7 +397,10 @@
       }
       apr_pool_clear(plog);
       ap_run_open_logs(pconf, plog, ptemp, server_conf);
  -    ap_run_post_config(pconf, plog, ptemp, server_conf);
  +    if ( ap_run_post_config(pconf, plog, ptemp, server_conf) != OK) {
  +        ap_log_error(APLOG_MARK, APLOG_STARTUP |APLOG_ERR| APLOG_NOERRNO, 0, NULL, "Configuration
Failed\n");
  +        destroy_and_exit_process(process, 1);
  +    }
       apr_pool_destroy(ptemp);
   
       for (;;) {
  @@ -423,7 +426,10 @@
           apr_sort_hooks();
   	apr_pool_clear(plog);
   	ap_run_open_logs(pconf, plog, ptemp, server_conf);
  -	ap_run_post_config(pconf, plog, ptemp, server_conf);
  +	if  (ap_run_post_config(pconf, plog, ptemp, server_conf) != OK) {
  +            ap_log_error(APLOG_MARK, APLOG_STARTUP |APLOG_ERR | APLOG_NOERRNO, 0, NULL,
"Configuration Failed\n");
  +            destroy_and_exit_process(process, 1);
  +        }
   	apr_pool_destroy(ptemp);
   	apr_pool_lock(pconf, 1);
   
  
  
  

Mime
View raw message