From: Fabian Keil Date: Wed, 17 Oct 2012 18:11:19 +0000 (+0000) Subject: Fix latency calculation for shared connections X-Git-Tag: v_3_0_20~251 X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=commitdiff_plain;h=dfd63736cecd1978cdeff5fee19d78ad872053c2 Fix latency calculation for shared connections It has been broken since I committed it with 1.57 in 2009. The calculated latency for most connections would be 0 due to remember_connection() always putting the timestamps in the first slot. Oops. --- diff --git a/gateway.c b/gateway.c index f36ed010..a1c6509e 100644 --- a/gateway.c +++ b/gateway.c @@ -1,4 +1,4 @@ -const char gateway_rcs[] = "$Id: gateway.c,v 1.86 2012/03/09 17:55:50 fabiankeil Exp $"; +const char gateway_rcs[] = "$Id: gateway.c,v 1.87 2012/03/10 11:06:09 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/gateway.c,v $ @@ -229,8 +229,8 @@ void remember_connection(const struct reusable_connection *connection) reusable_connection[slot].port = connection->port; reusable_connection[slot].in_use = 0; reusable_connection[slot].timestamp = connection->timestamp; - reusable_connection->request_sent = connection->request_sent; - reusable_connection->response_received = connection->response_received; + reusable_connection[slot].request_sent = connection->request_sent; + reusable_connection[slot].response_received = connection->response_received; reusable_connection[slot].keep_alive_timeout = connection->keep_alive_timeout; assert(reusable_connection[slot].gateway_host == NULL);