You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ia...@apache.org on 2002/09/06 05:00:13 UTC
cvs commit: httpd-2.0/modules/loggers mod_log_config.c mod_log_config.h
ianh 2002/09/05 20:00:11
Modified: modules/loggers mod_log_config.c mod_log_config.h
Log:
change the log_writer declaration so that it takes a request_rec instead of
just a pool.
(so that the writer can get to things like hostname)
Revision Changes Path
1.91 +7 -7 httpd-2.0/modules/loggers/mod_log_config.c
Index: mod_log_config.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/loggers/mod_log_config.c,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -r1.90 -r1.91
--- mod_log_config.c 27 Aug 2002 17:20:29 -0000 1.90
+++ mod_log_config.c 6 Sep 2002 03:00:10 -0000 1.91
@@ -213,13 +213,13 @@
static int xfer_flags = (APR_WRITE | APR_APPEND | APR_CREATE);
static apr_fileperms_t xfer_perms = APR_OS_DEFAULT;
static apr_hash_t *log_hash;
-static apr_status_t ap_default_log_writer(apr_pool_t *p,
+static apr_status_t ap_default_log_writer(request_rec *r,
void *handle,
const char **strs,
int *strl,
int nelts,
apr_size_t len);
-static apr_status_t ap_buffered_log_writer(apr_pool_t *p,
+static apr_status_t ap_buffered_log_writer(request_rec *r,
void *handle,
const char **strs,
int *strl,
@@ -895,7 +895,7 @@
"log writer isn't correctly setup");
return HTTP_INTERNAL_SERVER_ERROR;
}
- rv = log_writer(r->pool, cls->log_writer, strs, strl, format->nelts, len);
+ rv = log_writer(r, cls->log_writer, strs, strl, format->nelts, len);
/* xxx: do we return an error on log_writer? */
return OK;
}
@@ -1233,7 +1233,7 @@
log_writer = handle;
}
-static apr_status_t ap_default_log_writer(apr_pool_t *p,
+static apr_status_t ap_default_log_writer( request_rec *r,
void *handle,
const char **strs,
int *strl,
@@ -1246,7 +1246,7 @@
int i;
apr_status_t rv;
- str = apr_palloc(p, len + 1);
+ str = apr_palloc(r->pool, len + 1);
for (i = 0, s = str; i < nelts; ++i) {
memcpy(s, strs[i], strl[i]);
@@ -1302,7 +1302,7 @@
else
return NULL;
}
-static apr_status_t ap_buffered_log_writer(apr_pool_t *p,
+static apr_status_t ap_buffered_log_writer(request_rec *r,
void *handle,
const char **strs,
int *strl,
@@ -1323,7 +1323,7 @@
if (len >= LOG_BUFSIZE) {
apr_size_t w;
- str = apr_palloc(p, len + 1);
+ str = apr_palloc(r->pool, len + 1);
for (i = 0, s = str; i < nelts; ++i) {
memcpy(s, strs[i], strl[i]);
s += strl[i];
1.5 +2 -1 httpd-2.0/modules/loggers/mod_log_config.h
Index: mod_log_config.h
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/loggers/mod_log_config.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- mod_log_config.h 26 Aug 2002 23:23:45 -0000 1.4
+++ mod_log_config.h 6 Sep 2002 03:00:11 -0000 1.5
@@ -76,7 +76,8 @@
/**
* callback which gets called where there is a log line to write.
*/
-typedef apr_status_t ap_log_writer(apr_pool_t *p,
+typedef apr_status_t ap_log_writer(
+ request_rec *r,
void *handle,
const char **portions,
int *lengths,