You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by br...@hyperreal.org on 1998/05/29 03:09:06 UTC

cvs commit: apache-1.3/src/modules/standard mod_log_agent.c mod_log_config.c mod_log_referer.c mod_mime.c

brian       98/05/28 18:09:06

  Modified:    src      CHANGES
               src/modules/standard mod_log_agent.c mod_log_config.c
                        mod_log_referer.c mod_mime.c
  Log:
  PR: 1967
  
  Usage of printf(stderr, ...) is now ap_log_error, which is more resiliant in
  the face of certain failures.
  
  Thanks to Ralf & Dean for the hints.
  
  Revision  Changes    Path
  1.874     +4 -0      apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.873
  retrieving revision 1.874
  diff -u -r1.873 -r1.874
  --- CHANGES	1998/05/29 00:15:51	1.873
  +++ CHANGES	1998/05/29 01:08:57	1.874
  @@ -1,5 +1,9 @@
   Changes with Apache 1.3b8
   
  +  *) Changes usage of perror/fprintf to stderr to more proper ap_log_error
  +     in mod_mime, mod_log_referer, mod_log_agent, and mod_log_config.
  +     [Brian Behlendorf]
  +
     *) Various OS/2 cleanups ["Brian Havard" <br...@kheldar.apana.org.au>]
   
     *) PORT: QNX needed a #include <sys/mman.h>; and now it uses flock
  
  
  
  1.27      +2 -2      apache-1.3/src/modules/standard/mod_log_agent.c
  
  Index: mod_log_agent.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_log_agent.c,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- mod_log_agent.c	1998/05/19 23:48:36	1.26
  +++ mod_log_agent.c	1998/05/29 01:09:03	1.27
  @@ -125,8 +125,8 @@
       }
       else if (*cls->fname != '\0') {
           if ((cls->agent_fd = ap_popenf(p, fname, xfer_flags, xfer_mode)) < 0) {
  -            perror("open");
  -            fprintf(stderr, "httpd: could not open agent log file %s.\n", fname);
  +            ap_log_error(APLOG_MARK, APLOG_ERR, s,
  +                         "httpd: could not open agent log file %s.\n", fname);
               exit(1);
           }
       }
  
  
  
  1.58      +2 -3      apache-1.3/src/modules/standard/mod_log_config.c
  
  Index: mod_log_config.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_log_config.c,v
  retrieving revision 1.57
  retrieving revision 1.58
  diff -u -r1.57 -r1.58
  --- mod_log_config.c	1998/05/20 12:15:07	1.57
  +++ mod_log_config.c	1998/05/29 01:09:04	1.58
  @@ -916,9 +916,8 @@
       else {
           char *fname = ap_server_root_relative(p, cls->fname);
           if ((cls->log_fd = ap_popenf(p, fname, xfer_flags, xfer_mode)) < 0) {
  -            perror("open");
  -            fprintf(stderr, "httpd: could not open transfer log file %s.\n",
  -                    fname);
  +            ap_log_error(APLOG_MARK, APLOG_ERR, s,
  +                         "httpd: could not open transfer log file %s.\n", fname);
               exit(1);
           }
       }
  
  
  
  1.30      +4 -4      apache-1.3/src/modules/standard/mod_log_referer.c
  
  Index: mod_log_referer.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_log_referer.c,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- mod_log_referer.c	1998/05/20 22:54:01	1.29
  +++ mod_log_referer.c	1998/05/29 01:09:04	1.30
  @@ -142,10 +142,10 @@
       }
       else if (*cls->fname != '\0') {
           if ((cls->referer_fd = ap_popenf(p, fname, xfer_flags, xfer_mode)) < 0) {
  -            perror("open");
  -            fprintf(stderr, "httpd: could not open referer log file %s.\n", fname);
  -            exit(1);
  -        }
  +	    ap_log_error(APLOG_MARK, APLOG_ERR, s,
  +			 "httpd: could not open referer log file %s.\n", fname);        
  +	    exit(1);
  +	}
       }
   }
   
  
  
  
  1.40      +3 -3      apache-1.3/src/modules/standard/mod_mime.c
  
  Index: mod_mime.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_mime.c,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- mod_mime.c	1998/04/11 12:00:49	1.39
  +++ mod_mime.c	1998/05/29 01:09:04	1.40
  @@ -66,6 +66,7 @@
   
   #include "httpd.h"
   #include "http_config.h"
  +#include "http_log.h"
   
   typedef struct {
       table *forced_types;        /* Additional AddTyped stuff */
  @@ -215,9 +216,8 @@
       types_confname = ap_server_root_relative(p, types_confname);
   
       if (!(f = ap_pcfg_openfile(p, types_confname))) {
  -        perror("fopen");
  -        fprintf(stderr, "httpd: could not open mime types file %s\n",
  -                types_confname);
  +        ap_log_error(APLOG_MARK, APLOG_ERR, s,
  +		     "httpd: could not open mime types log file %s.\n", types_confname);
           exit(1);
       }