httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@locus.apache.org
Subject cvs commit: apache-2.0/src/os/unix unixd.c
Date Mon, 17 Jul 2000 22:11:48 GMT
trawick     00/07/17 15:11:48

  Modified:    src/main http_connection.c util.c util_uri.c
               src/modules/mpm/mpmt mpmt.c
               src/modules/mpm/mpmt_pthread mpmt_pthread.c
               src/modules/proxy mod_proxy.c
               src/modules/standard mod_include.c
               src/os/bs2000 bs2login.c
               src/os/tpf os.c
               src/os/unix unixd.c
  Log:
  Fix some bad ap_log_error() invocations.  Comment on a bad
  ap_log_rerror() invocation.
  
  Almost all of this is in code never compiled.
  
  Revision  Changes    Path
  1.42      +1 -1      apache-2.0/src/main/http_connection.c
  
  Index: http_connection.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/http_connection.c,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- http_connection.c	2000/06/26 20:37:49	1.41
  +++ http_connection.c	2000/07/17 22:11:12	1.42
  @@ -118,7 +118,7 @@
   
       if (setsockopt(s, SOL_SOCKET, SO_LINGER, 
   		   (char *) &li, sizeof(struct linger)) < 0) {
  -	ap_log_error(APLOG_MARK, APLOG_WARNING, server_conf,
  +	ap_log_error(APLOG_MARK, APLOG_WARNING, errno, server_conf,
   	            "setsockopt: (SO_LINGER)");
   	/* not a fatal error */
       }
  
  
  
  1.62      +5 -5      apache-2.0/src/main/util.c
  
  Index: util.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/util.c,v
  retrieving revision 1.61
  retrieving revision 1.62
  diff -u -r1.61 -r1.62
  --- util.c	2000/07/17 21:20:43	1.61
  +++ util.c	2000/07/17 22:11:13	1.62
  @@ -824,7 +824,7 @@
   API_EXPORT(int) ap_cfg_closefile(configfile_t *cfp)
   {
   #ifdef DEBUG
  -    ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, NULL, 
  +    ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, NULL, 
           "Done with config file %s", cfp->name);
   #endif
       return (cfp->close == NULL) ? 0 : cfp->close(cfp->param);
  @@ -879,7 +879,7 @@
   
       status = ap_open(&file, name, APR_READ | APR_BUFFERED, APR_OS_DEFAULT, p);
   #ifdef DEBUG
  -    ap_log_error(APLOG_MARK, APLOG_DEBUG | APLOG_NOERRNO, NULL,
  +    ap_log_error(APLOG_MARK, APLOG_DEBUG | APLOG_NOERRNO, 0, NULL,
                   "Opening config file %s (%s)",
                   name, (status != APR_SUCCESS) ? 
                   ap_strerror(status, buf, sizeof(buf)) : "successful");
  @@ -927,7 +927,7 @@
   {
       configfile_t *new_cfg = ap_palloc(p, sizeof(*new_cfg));
   #ifdef DEBUG
  -    ap_log_error(APLOG_MARK, APLOG_DEBUG | APLOG_NOERRNO, NULL, "Opening config handler
%s", descr);
  +    ap_log_error(APLOG_MARK, APLOG_DEBUG | APLOG_NOERRNO, 0, NULL, "Opening config handler
%s", descr);
   #endif
       new_cfg->param = param;
       new_cfg->name = descr;
  @@ -1016,7 +1016,7 @@
   	        ;
   
   #ifdef DEBUG_CFG_LINES
  -	ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, NULL, "Read config: %s", buf);
  +	ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, NULL, "Read config: %s", buf);
   #endif
   	return 0;
       } else {
  @@ -1073,7 +1073,7 @@
   		    --i;
   		buf[i] = '\0';
   #ifdef DEBUG_CFG_LINES
  -		ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, NULL, "Read config: %s", buf);
  +		ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, NULL, "Read config: %s", buf);
   #endif
   		return 0;
   	    }
  
  
  
  1.16      +4 -4      apache-2.0/src/main/util_uri.c
  
  Index: util_uri.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/util_uri.c,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- util_uri.c	2000/06/28 14:33:33	1.15
  +++ util_uri.c	2000/07/17 22:11:14	1.16
  @@ -272,7 +272,7 @@
   
   	/* Make a readable error message */
   	ret = regerror(ret, &re_uri, line, sizeof line);
  -	ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, NULL,
  +	ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, NULL,
   		"Internal error: regcomp(\"%s\") returned non-zero (%s) - "
   		"possibly due to broken regex lib! "
   		"Did you define WANTHSREGEX=yes?",
  @@ -291,7 +291,7 @@
   
   	/* Make a readable error message */
   	ret = regerror(ret, &re_hostpart, line, sizeof line);
  -	ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, NULL,
  +	ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, NULL,
   		"Internal error: regcomp(\"%s\") returned non-zero (%s) - "
   		"possibly due to broken regex lib! "
   		"Did you define WANTHSREGEX=yes?",
  @@ -327,7 +327,7 @@
       ret = ap_regexec(&re_uri, uri, re_uri.re_nsub + 1, match, 0);
   
       if (ret != 0) {
  -	ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, NULL,
  +	ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, NULL,
                       "ap_regexec() could not parse uri (\"%s\")",
   		    uri);
   
  @@ -356,7 +356,7 @@
   	/* Parse the hostinfo part to extract user, password, host, and port */
   	ret = ap_regexec(&re_hostpart, uptr->hostinfo, re_hostpart.re_nsub + 1, match,
0);
   	if (ret != 0) {
  -	    ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, NULL,
  +	    ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, NULL,
                       "ap_regexec() could not parse (\"%s\") as host part",
   		    uptr->hostinfo);
   
  
  
  
  1.14      +1 -1      apache-2.0/src/modules/mpm/mpmt/mpmt.c
  
  Index: mpmt.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/mpmt/mpmt.c,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- mpmt.c	2000/07/13 17:33:31	1.13
  +++ mpmt.c	2000/07/17 22:11:18	1.14
  @@ -1092,7 +1092,7 @@
           int status = bindprocessor(BINDPROCESS, (int)getpid(),
                                  PROCESSOR_CLASS_ANY);
           if (status != OK)
  -            ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, 
  +            ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, errno,
                            ap_server_conf, "processor unbind failed %d", status);
   #endif
   
  
  
  
  1.108     +1 -1      apache-2.0/src/modules/mpm/mpmt_pthread/mpmt_pthread.c
  
  Index: mpmt_pthread.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/mpmt_pthread/mpmt_pthread.c,v
  retrieving revision 1.107
  retrieving revision 1.108
  diff -u -r1.107 -r1.108
  --- mpmt_pthread.c	2000/07/11 22:12:17	1.107
  +++ mpmt_pthread.c	2000/07/17 22:11:23	1.108
  @@ -761,7 +761,7 @@
           int status = bindprocessor(BINDPROCESS, (int)getpid(),
   			       PROCESSOR_CLASS_ANY);
   	if (status != OK)
  -	    ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, ap_server_conf,
  +	    ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, errno, ap_server_conf,
   			 "processor unbind failed %d", status);
   #endif
   
  
  
  
  1.10      +5 -5      apache-2.0/src/modules/proxy/mod_proxy.c
  
  Index: mod_proxy.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/proxy/mod_proxy.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- mod_proxy.c	2000/06/12 21:41:57	1.9
  +++ mod_proxy.c	2000/07/17 22:11:29	1.10
  @@ -644,30 +644,30 @@
   
       if (ap_proxy_is_ipaddr(New, parms->pool)) {
   #if DEBUGGING
  -        ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, 0, NULL, 
  +        ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
                            "Parsed addr %s", inet_ntoa(New->addr));
  -        ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, 0, NULL, 
  +        ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
                            "Parsed mask %s", inet_ntoa(New->mask));
   #endif
       }
       else if (ap_proxy_is_domainname(New, parms->pool)) {
           ap_str_tolower(New->name);
   #if DEBUGGING
  -        ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, 0, NULL, 
  +        ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
                            "Parsed domain %s", New->name);
   #endif
       }
       else if (ap_proxy_is_hostname(New, parms->pool)) {
           ap_str_tolower(New->name);
   #if DEBUGGING
  -        ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, 0, NULL, 
  +        ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
                            "Parsed host %s", New->name);
   #endif
       }
       else {
           ap_proxy_is_word(New, parms->pool);
   #if DEBUGGING
  -        ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, 0, NULL, 
  +        ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
                            "Parsed word %s", New->name);
   #endif
       }
  
  
  
  1.45      +3 -0      apache-2.0/src/modules/standard/mod_include.c
  
  Index: mod_include.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_include.c,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- mod_include.c	2000/07/06 14:40:36	1.44
  +++ mod_include.c	2000/07/17 22:11:32	1.45
  @@ -1139,6 +1139,9 @@
   
           if (error_fmt) {
               ret = -1;
  +            /* TODO: pass APLOG_NOERRNO if no ap_stat() failure; pass rv from ap_stat()
  +             * otherwise
  +             */
               ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, error_fmt, to_send, r->filename);
               ap_rputs(error, r);
           }
  
  
  
  1.6       +6 -6      apache-2.0/src/os/bs2000/bs2login.c
  
  Index: bs2login.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/os/bs2000/bs2login.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- bs2login.c	2000/04/14 15:59:16	1.5
  +++ bs2login.c	2000/07/17 22:11:44	1.6
  @@ -119,7 +119,7 @@
   
       if (uname(&os_version) < 0)
       {
  -	ap_log_error(APLOG_MARK, APLOG_ALERT, NULL,
  +	ap_log_error(APLOG_MARK, APLOG_ALERT, errno, NULL,
   		     "uname() failed - aborting.");
   	exit(APEXIT_CHILDFATAL);
       }
  @@ -132,7 +132,7 @@
   	strcmp(os_version.release, "02.0A") == 0 ||
   	strcmp(os_version.release, "02.1A") == 0)
       {
  -	ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, NULL,
  +	ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, NULL,
   		     "Error: unsupported OS version. "
   		     "You may encounter problems.");
   	forktype = bs2_FORK;
  @@ -207,7 +207,7 @@
   
   	type = forktype = bs2_noFORK;
   
  -	ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, server,
  +	ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, server,
   		     "The debug mode of Apache should only "
   		     "be started by an unprivileged user!");
   	return 0;
  @@ -220,7 +220,7 @@
       /* An Account is required for _rini() */
       if (bs2000_account == NULL)
       {
  -	ap_log_error(APLOG_MARK, APLOG_ALERT|APLOG_NOERRNO, server,
  +	ap_log_error(APLOG_MARK, APLOG_ALERT|APLOG_NOERRNO, 0, server,
   		     "No BS2000Account configured - cannot switch to User %s",
   		     user_name);
   	exit(APEXIT_CHILDFATAL);
  @@ -242,7 +242,7 @@
       /* Only the super user can switch identities. */
       if (_rini(&inittask) != 0) {
   
  -	ap_log_error(APLOG_MARK, APLOG_ALERT, server,
  +	ap_log_error(APLOG_MARK, APLOG_ALERT, errno, server,
   		     "_rini: BS2000 auth failed for user \"%s\" acct \"%s\"",
   		     inittask.username, inittask.account);
   
  @@ -276,7 +276,7 @@
   
   	pid = ufork(username);
   	if (pid == -1 && errno == EPERM) {
  -	    ap_log_error(APLOG_MARK, APLOG_EMERG,
  +	    ap_log_error(APLOG_MARK, APLOG_EMERG, errno,
   			 NULL, "ufork: Possible mis-configuration "
   			 "for user %s - Aborting.", user);
   	    exit(1);
  
  
  
  1.7       +2 -2      apache-2.0/src/os/tpf/os.c
  
  Index: os.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/os/tpf/os.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- os.c	2000/04/14 15:59:17	1.6
  +++ os.c	2000/07/17 22:11:47	1.7
  @@ -349,11 +349,11 @@
   
       fflush(stdin);
       if (dup2(fileno(sock_fp), STDIN_FILENO) == -1)
  -        ap_log_error(APLOG_MARK, APLOG_CRIT, s,
  +        ap_log_error(APLOG_MARK, APLOG_CRIT, errno, s,
           "unable to replace stdin with sock device driver");
       fflush(stdout);
       if (dup2(fileno(sock_fp), STDOUT_FILENO) == -1)
  -        ap_log_error(APLOG_MARK, APLOG_CRIT, s,
  +        ap_log_error(APLOG_MARK, APLOG_CRIT, errno, s,
           "unable to replace stdout with sock device driver");
       input_parms.generation = ap_my_generation;
   #ifdef SCOREBOARD_FILE
  
  
  
  1.22      +1 -1      apache-2.0/src/os/unix/unixd.c
  
  Index: unixd.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/os/unix/unixd.c,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- unixd.c	2000/06/28 14:33:48	1.21
  +++ unixd.c	2000/07/17 22:11:47	1.22
  @@ -353,7 +353,7 @@
       limit = *plimit;
       if ((getrlimit(type, limit)) != 0)  {
           *plimit = NULL;
  -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, cmd->server,
  +        ap_log_error(APLOG_MARK, APLOG_ERR, errno, cmd->server,
                        "%s: getrlimit failed", cmd->cmd->name);
           return;
       }
  
  
  

Mime
View raw message