summaryrefslogtreecommitdiffstats
path: root/functions20.h
diff options
context:
space:
mode:
Diffstat (limited to 'functions20.h')
-rw-r--r--functions20.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/functions20.h b/functions20.h
index c8701a2..31d9e4b 100644
--- a/functions20.h
+++ b/functions20.h
@@ -1,5 +1,14 @@
1/* $Header: /home/cvs/mod_log_sql/functions20.h,v 1.2 2004/01/20 19:38:08 urkle Exp $ */ 1/* $Header: /home/cvs/mod_log_sql/functions20.h,v 1.3 2004/02/05 21:59:46 urkle Exp $ */
2/* functions */ 2/* functions */
3static const char *extract_bytes_sent(request_rec *r, char *a)
4{
5 if (!r->sent_bodyct || !r->bytes_sent) {
6 return "-";
7 } else {
8 return apr_psprintf(r->pool, "%" APR_OFF_T_FMT, r->bytes_sent);
9 }
10}
11
3static const char *extract_request_time_custom(request_rec *r, char *a, 12static const char *extract_request_time_custom(request_rec *r, char *a,
4 apr_time_exp_t *xt) 13 apr_time_exp_t *xt)
5{ 14{
@@ -91,3 +100,17 @@ static const char *extract_request_timestamp(request_rec *r, char *a)
91{ 100{
92 return apr_psprintf(r->pool, "%"APR_TIME_T_FMT, apr_time_sec(apr_time_now())); 101 return apr_psprintf(r->pool, "%"APR_TIME_T_FMT, apr_time_sec(apr_time_now()));
93} 102}
103
104static const char *extract_connection_status(request_rec *r, char *a) __attribute__((unused));
105static const char *extract_connection_status(request_rec *r, char *a)
106{
107 if (r->connection->aborted)
108 return "X";
109
110 if (r->connection->keepalive == AP_CONN_KEEPALIVE &&
111 (!r->server->keep_alive_max ||
112 (r->server->keep_alive_max - r->connection->keepalives) > 0)) {
113 return "+";
114 }
115 return "-";
116}