httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From field...@hyperreal.org
Subject cvs commit: apache-1.3/src/main http_core.c
Date Sun, 07 Mar 1999 15:35:19 GMT
fielding    99/03/07 07:35:18

  Modified:    src      CHANGES
               src/main http_core.c
  Log:
  Added informative error messages for failed munmap() and fseek() calls
  in http_core.c.
  
  Submitted by:	John Bley <jbb6@acpub.duke.edu>, Roy Fielding
  
  Revision  Changes    Path
  1.1263    +3 -0      apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1262
  retrieving revision 1.1263
  diff -u -r1.1262 -r1.1263
  --- CHANGES	1999/03/07 15:05:33	1.1262
  +++ CHANGES	1999/03/07 15:35:14	1.1263
  @@ -18,6 +18,9 @@
   
     *) Fixed a few compiler nits.  [John Bley <jbb6@acpub.duke.edu>]
   
  +  *) Added informative error messages for failed munmap() and fseek() calls
  +     in http_core.c. [John Bley, Roy Fielding]
  +
     *) Added some informative error messages for some failed malloc()
        calls. [John Bley <jbb6@acpub.duke.edu>, Jim Jagielski]
   
  
  
  
  1.253     +14 -4     apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.252
  retrieving revision 1.253
  diff -u -r1.252 -r1.253
  --- http_core.c	1999/03/07 13:13:52	1.252
  +++ http_core.c	1999/03/07 15:35:17	1.253
  @@ -1070,7 +1070,7 @@
   
       if (error_number == 401 &&
   	line[0] != '/' && line[0] != '"') { /* Ignore it... */
  -	ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, NULL,
  +	ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, cmd->server,
   		     "cannot use a full URL in a 401 ErrorDocument "
   		     "directive --- ignoring!");
       }
  @@ -2937,7 +2937,11 @@
   {
       struct mmap *mmd = mmv;
   
  -    munmap(mmd->mm, mmd->length);
  +    if (munmap(mmd->mm, mmd->length) == -1) {
  +        ap_log_error(APLOG_MARK, APLOG_ERR, NULL,
  +                     "Failed to munmap memory of length %ld at 0x%lx",
  +                     (long) mmd->length, (long) mmd->mm);
  +    }
   }
   #endif
   
  @@ -3066,8 +3070,14 @@
   	    else {
   		long offset, length;
   		while (ap_each_byterange(r, &offset, &length)) {
  -		    fseek(f, offset, SEEK_SET);
  -		    ap_send_fd_length(f, r, length);
  +		    if (fseek(f, offset, SEEK_SET) == -1) {
  +			ap_log_error(APLOG_MARK, APLOG_ERR, r->server,
  +			      "Failed to fseek for byterange (%ld, %ld)",
  +			      offset, length);
  +		    }
  +		    else {
  +			ap_send_fd_length(f, r, length);
  +		    }
   		}
   	    }
   	}
  
  
  

Mime
View raw message