Browse Source

[core] Add vr->ts_started struct member, representing the ev_tstamp when the vr has been started

personal/stbuehler/wip
Thomas Porzelt 13 years ago
parent
commit
9bd5c39550
  1. 2
      include/lighttpd/virtualrequest.h
  2. 2
      src/main/virtualrequest.c
  3. 1
      src/main/worker.c

2
include/lighttpd/virtualrequest.h

@ -65,6 +65,8 @@ struct liVRequest {
liVRequestState state;
ev_tstamp ts_started;
liVRequestHandlerCB
handle_request_headers,
handle_response_headers, handle_response_body,

2
src/main/virtualrequest.c

@ -324,6 +324,8 @@ void li_vrequest_start(liVRequest *vr) {
if (LI_VRS_CLEAN == vr->state) {
li_request_reset(&vr->request);
}
vr->ts_started = CUR_TS(vr->wrk);
}
/* received all request headers */

1
src/main/worker.c

@ -285,6 +285,7 @@ void li_worker_new_con(liWorker *ctx, liWorker *wrk, liSocketAddress remote_addr
ev_io_set(&con->sock_watcher, s, EV_READ);
ev_io_start(wrk->loop, &con->sock_watcher);
con->ts_started = CUR_TS(wrk);
con->mainvr->ts_started = CUR_TS(wrk);
con->remote_addr = remote_addr;
li_sockaddr_to_string(remote_addr, con->remote_addr_str, FALSE);

Loading…
Cancel
Save