From 45220bcc856d6fa4b86e3f36eeaebd63d994f03f Mon Sep 17 00:00:00 2001 From: Edward Rudd Date: Thu, 05 Feb 2004 21:59:47 +0000 Subject: synchronized extract_* functions with latest apache 1.3 and 2.0. Added some more recent extract_* functions.. still need to assign format letters cleanup/audit of extract_* functions release 1.95 --- (limited to 'functions20.h') diff --git a/functions20.h b/functions20.h index c8701a2..31d9e4b 100644 --- a/functions20.h +++ b/functions20.h @@ -1,5 +1,14 @@ -/* $Header: /home/cvs/mod_log_sql/functions20.h,v 1.2 2004/01/20 19:38:08 urkle Exp $ */ +/* $Header: /home/cvs/mod_log_sql/functions20.h,v 1.3 2004/02/05 21:59:46 urkle Exp $ */ /* functions */ +static const char *extract_bytes_sent(request_rec *r, char *a) +{ + if (!r->sent_bodyct || !r->bytes_sent) { + return "-"; + } else { + return apr_psprintf(r->pool, "%" APR_OFF_T_FMT, r->bytes_sent); + } +} + static const char *extract_request_time_custom(request_rec *r, char *a, apr_time_exp_t *xt) { @@ -91,3 +100,17 @@ static const char *extract_request_timestamp(request_rec *r, char *a) { return apr_psprintf(r->pool, "%"APR_TIME_T_FMT, apr_time_sec(apr_time_now())); } + +static const char *extract_connection_status(request_rec *r, char *a) __attribute__((unused)); +static const char *extract_connection_status(request_rec *r, char *a) +{ + if (r->connection->aborted) + return "X"; + + if (r->connection->keepalive == AP_CONN_KEEPALIVE && + (!r->server->keep_alive_max || + (r->server->keep_alive_max - r->connection->keepalives) > 0)) { + return "+"; + } + return "-"; +} -- cgit v0.9.2