summaryrefslogtreecommitdiffstats
path: root/AUTHORS
diff options
context:
space:
mode:
authorGravatar Edward Rudd 2004-08-23 05:41:37 +0000
committerGravatar Edward Rudd 2004-08-23 05:41:37 +0000
commit104bb4c049e8a672af96977434bda814feee83b8 (patch)
tree8a6f307bc5cd60c625b8c57233f93ac8b75161e5 /AUTHORS
parentceb9aca770cf5b5464522fc032eb0f1cf73d6867 (diff)
fixes by Douglas E. Warner to fix "NULL" fields.
finally fixed the annoying reconnect mysql segfault.
Diffstat (limited to 'AUTHORS')
0 files changed, 0 insertions, 0 deletions
class="hl kwb">static const char *extract_request_time(request_rec *r, char *a) { int timz; struct tm *t; char tstr[MAX_STRING_LEN]; t = ap_get_gmtoff(&timz); if (a && *a) { /* Custom format */ strftime(tstr, MAX_STRING_LEN, a, t); } else { /* CLF format */ char sign = (timz < 0 ? '-' : '+'); if (timz < 0) { timz = -timz; } strftime(tstr, MAX_STRING_LEN, "[%d/%b/%Y:%H:%M:%S ", t); ap_snprintf(tstr + strlen(tstr), sizeof(tstr) - strlen(tstr), "%c%.2d%.2d]", sign, timz / 60, timz % 60); } return ap_pstrdup(r->pool, tstr); } static const char *extract_request_duration(request_rec *r, char *a) { return ap_psprintf(r->pool, "%ld", time(NULL) - r->request_time); } static const char *extract_request_timestamp(request_rec *r, char *a) { return ap_psprintf(r->pool, "%ld", (long) time(NULL)); } 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) && ((r->server->keep_alive_max - r->connection->keepalives) > 0)) { return "+"; } return "-"; }