From 4260c97e4c0b36b0d347294376b97afc56f64c37 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Fri, 18 Sep 2009 18:52:33 +0000 Subject: [PATCH] In serve(), make the latency loop-local and actually calculate it. Oops. In other words: Revision 270. Once more, with feeling. --- jcc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/jcc.c b/jcc.c index f6e1c9be..9795626d 100644 --- a/jcc.c +++ b/jcc.c @@ -1,4 +1,4 @@ -const char jcc_rcs[] = "$Id: jcc.c,v 1.291 2009/09/12 12:35:14 fabiankeil Exp $"; +const char jcc_rcs[] = "$Id: jcc.c,v 1.292 2009/09/12 12:37:37 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/jcc.c,v $ @@ -2479,12 +2479,16 @@ static void serve(struct client_state *csp) static int monitor_thread_running = 0; #endif /* def FEATURE_CONNECTION_SHARING */ int continue_chatting = 0; - unsigned int latency = 0; do { + unsigned int latency; + chat(csp); + latency = (unsigned)(csp->server_connection.response_received - + csp->server_connection.request_sent); + continue_chatting = (csp->config->feature_flags & RUNTIME_FEATURE_CONNECTION_KEEP_ALIVE) && (csp->flags & CSP_FLAG_SERVER_CONNECTION_KEEP_ALIVE) -- 2.39.2