httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject cvs commit: httpd-2.0/server listen.c
Date Tue, 02 Jan 2001 01:34:05 GMT
rbb         01/01/01 17:34:05

  Modified:    modules/http http_core.c
               modules/mappers mod_so.c
               server   listen.c
  Log:
  Modify a couple of calls to ap_log_error with a NULL server to use
  ap_log_perror, and pass a pool.  The keeps us from seg faulting if the
  error log hasn't been opened yet.
  
  Revision  Changes    Path
  1.233     +1 -1      httpd-2.0/modules/http/http_core.c
  
  Index: http_core.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/http/http_core.c,v
  retrieving revision 1.232
  retrieving revision 1.233
  diff -u -r1.232 -r1.233
  --- http_core.c	2000/12/28 23:27:20	1.232
  +++ http_core.c	2001/01/02 01:34:05	1.233
  @@ -1195,7 +1195,7 @@
       arg = ap_os_canonical_filename(cmd->pool, arg);
       if (/* TODO: ap_configtestonly && ap_docrootcheck && */ !ap_is_directory(arg))
{
   	if (cmd->server->is_virtual) {
  -	    ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL,
  +	    ap_log_perror(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, cmd->pool,
                            "Warning: DocumentRoot [%s] does not exist",
   		         arg);
   	}
  
  
  
  1.30      +6 -5      httpd-2.0/modules/mappers/mod_so.c
  
  Index: mod_so.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/mappers/mod_so.c,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- mod_so.c	2000/11/26 04:47:37	1.29
  +++ mod_so.c	2001/01/02 01:34:05	1.30
  @@ -186,8 +186,9 @@
   
       /* unload the module space itself */
       if ((status = apr_dso_unload(modi->modp->dynamic_load_handle)) != APR_SUCCESS)
{
  -        ap_log_error(APLOG_MARK, APLOG_WARNING|APLOG_NOERRNO, 0, NULL,
  -		     "dso unload failure");
  +        ap_log_perror(APLOG_MARK, APLOG_WARNING|APLOG_NOERRNO, 0, 
  +                      APR_GET_POOL(modi->modp->dynamic_load_handle),
  +		      "dso unload failure");
           return status;
       }
   
  @@ -263,7 +264,7 @@
   			  apr_dso_error(modhandle, my_error, sizeof(my_error)),
   			  NULL);
       }
  -    ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, NULL,
  +    ap_log_perror(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, cmd->pool,
   		 "loaded module %s", modname);
   
       /*
  @@ -347,7 +348,7 @@
   
   static const char *load_file(cmd_parms *cmd, void *dummy, const char *filename)
   {
  -    ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +    ap_log_perror(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, cmd->pool, 
                    "WARNING: LoadFile not supported on this platform");
       return NULL;
   }
  @@ -355,7 +356,7 @@
   static const char *load_module(cmd_parms *cmd, void *dummy, 
   	                       const char *modname, const char *filename)
   {
  -    ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +    ap_log_perror(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, cmd->pool, 
                    "WARNING: LoadModule not supported on this platform");
       return NULL;
   }
  
  
  
  1.45      +7 -7      httpd-2.0/server/listen.c
  
  Index: listen.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/listen.c,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- listen.c	2000/12/17 17:47:03	1.44
  +++ listen.c	2001/01/02 01:34:05	1.45
  @@ -90,7 +90,7 @@
   
       stat = apr_setsocketopt(s, APR_SO_REUSEADDR, one);
       if (stat != APR_SUCCESS && stat != APR_ENOTIMPL) {
  -	ap_log_error(APLOG_MARK, APLOG_CRIT, stat, NULL,
  +	ap_log_perror(APLOG_MARK, APLOG_CRIT, stat, p,
   		    "make_sock: for address %pI, setsockopt: (SO_REUSEADDR)", 
                        server->bind_addr);
   	apr_close_socket(s);
  @@ -99,7 +99,7 @@
       
       stat = apr_setsocketopt(s, APR_SO_KEEPALIVE, one);
       if (stat != APR_SUCCESS && stat != APR_ENOTIMPL) {
  -	ap_log_error(APLOG_MARK, APLOG_CRIT, stat, NULL,
  +	ap_log_perror(APLOG_MARK, APLOG_CRIT, stat, p,
   		    "make_sock: for address %pI, setsockopt: (SO_KEEPALIVE)", 
                        server->bind_addr);
   	apr_close_socket(s);
  @@ -128,7 +128,7 @@
       if (send_buffer_size) {
   	stat = apr_setsocketopt(s, APR_SO_SNDBUF,  send_buffer_size);
           if (stat != APR_SUCCESS && stat != APR_ENOTIMPL) {
  -            ap_log_error(APLOG_MARK, APLOG_WARNING, stat, NULL,
  +            ap_log_perror(APLOG_MARK, APLOG_WARNING, stat, p,
   			"make_sock: failed to set SendBufferSize for "
                            "address %pI, using default", 
                            server->bind_addr);
  @@ -141,7 +141,7 @@
   #endif
   
       if ((stat = apr_bind(s, server->bind_addr)) != APR_SUCCESS) {
  -	ap_log_error(APLOG_MARK, APLOG_CRIT, stat, NULL,
  +	ap_log_perror(APLOG_MARK, APLOG_CRIT, stat, p,
                        "make_sock: could not bind to address %pI", 
                        server->bind_addr);
   	apr_close_socket(s);
  @@ -149,7 +149,7 @@
       }
   
       if ((stat = apr_listen(s, ap_listenbacklog)) != APR_SUCCESS) {
  -	ap_log_error(APLOG_MARK, APLOG_ERR, stat, NULL,
  +	ap_log_perror(APLOG_MARK, APLOG_ERR, stat, p,
   	    "make_sock: unable to listen for connections on address %pI", 
                        server->bind_addr);
   	apr_close_socket(s);
  @@ -242,13 +242,13 @@
       new->active = 0;
       if ((status = apr_getaddrinfo(&new->bind_addr, addr, APR_UNSPEC, port, 0, 
                                     process->pool)) != APR_SUCCESS) {
  -        ap_log_error(APLOG_MARK, APLOG_CRIT, status, NULL,
  +        ap_log_perror(APLOG_MARK, APLOG_CRIT, status, process->pool,
                        "alloc_listener: failed to set up sockaddr for %s", addr);
           return;
       }
       if ((status = apr_create_socket(&new->sd, new->bind_addr->sa.sin.sin_family,

                                       SOCK_STREAM, process->pool)) != APR_SUCCESS) {
  -        ap_log_error(APLOG_MARK, APLOG_CRIT, status, NULL,
  +        ap_log_perror(APLOG_MARK, APLOG_CRIT, status, process->pool,
                        "alloc_listener: failed to get a socket for %s", addr);
           return;
       }
  
  
  

Mime
View raw message