httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: [PATCH] another lame ap_strerror() implementation
Date Wed, 19 Apr 2000 14:04:00 GMT

Okay, a new design.  I'll write the code in the next hour or so, but allow
me to outline it here.

Pass a pool to ap_sterror always, this allows ap_strerror to create the
buffer correctly.

The obvious argument against this is that we don't always have a pool in
log_error_core.  There is a solution to this problem though  :-)

There are currently two ways to call log_error_core, through ap_log_error,
and ap_log_rerror.  These accept either request_recs or server_recs.  Both
of these allow access to a pool.  So, the only problem now is when we pass
NULL for either the server or request rec.  This is also easily solved

The solution is to provide ap_log_perror.  This allows people to pass a
pool directly to the error routine.  A pool should always be available
when we are generating a log message.  If a pool isn't available, then we
should be exiting after the error message is logged anyway, and passing
NULL for the pool will make it use malloc.  This should be a LAST resort,
we shouls ALWAYS pass a pool if possible.

A patch is coming soon.


On Wed, 19 Apr 2000, Jeff Trawick wrote:

> Gee... No comments?  (not complaining; I just hope nobody starts
> raising objections after I put it in the library)
> -- 
> Jeff Trawick | | PGP public key at web site:
>           Born in Roswell... married an alien...

Ryan Bloom               
406 29th St.
San Francisco, CA 94131

View raw message