-const char gateway_rcs[] = "$Id: gateway.c,v 1.89 2012/10/17 18:11:40 fabiankeil Exp $";
+const char gateway_rcs[] = "$Id: gateway.c,v 1.90 2012/10/17 18:13:26 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/gateway.c,v $
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;
+ reusable_connection[slot].requests_sent_total = connection->requests_sent_total;
assert(reusable_connection[slot].gateway_host == NULL);
assert(reusable_connection[slot].gateway_port == 0);
closed_connection->request_sent = 0;
closed_connection->response_received = 0;
closed_connection->keep_alive_timeout = 0;
+ closed_connection->requests_sent_total = 0;
closed_connection->forwarder_type = SOCKS_NONE;
freez(closed_connection->gateway_host);
closed_connection->gateway_port = 0;
reusable_connection[slot].in_use = TRUE;
sfd = reusable_connection[slot].sfd;
log_error(LOG_LEVEL_CONNECT,
- "Found reusable socket %d for %s:%d in slot %d. "
- "Timestamp made %d seconds ago. Timeout: %d. Latency: %d.",
+ "Found reusable socket %d for %s:%d in slot %d. Timestamp made %d "
+ "seconds ago. Timeout: %d. Latency: %d. Requests served: %d",
sfd, reusable_connection[slot].host, reusable_connection[slot].port,
slot, time(NULL) - reusable_connection[slot].timestamp,
reusable_connection[slot].keep_alive_timeout,
(int)(reusable_connection[slot].response_received -
- reusable_connection[slot].request_sent));
+ reusable_connection[slot].request_sent),
+ reusable_connection[slot].requests_sent_total);
break;
}
}
-const char jcc_rcs[] = "$Id: jcc.c,v 1.398 2012/10/21 12:51:57 fabiankeil Exp $";
+const char jcc_rcs[] = "$Id: jcc.c,v 1.399 2012/10/21 12:53:33 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/jcc.c,v $
&& connection_destination_matches(&csp->server_connection, http, fwd))
{
log_error(LOG_LEVEL_CONNECT,
- "Reusing server socket %u. Opened for %s.",
- csp->server_connection.sfd, csp->server_connection.host);
+ "Reusing server socket %d connected to %s. Total requests: %u.",
+ csp->server_connection.sfd, csp->server_connection.host,
+ csp->server_connection.requests_sent_total);
}
else
{
}
#endif /* def FEATURE_CONNECTION_KEEP_ALIVE */
+ csp->server_connection.requests_sent_total++;
+
if (fwd->forward_host || (http->ssl == 0))
{
int write_failure;
#ifndef PROJECT_H_INCLUDED
#define PROJECT_H_INCLUDED
/** Version string. */
-#define PROJECT_H_VERSION "$Id: project.h,v 1.186 2012/10/21 12:52:35 fabiankeil Exp $"
+#define PROJECT_H_VERSION "$Id: project.h,v 1.187 2012/10/21 12:53:33 fabiankeil Exp $"
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/project.h,v $
* connection will no longer be reused.
*/
unsigned int keep_alive_timeout;
+ /*
+ * Number of requests that were sent to this connection.
+ * This is currently only for debugging purposes.
+ */
+ unsigned int requests_sent_total;
char *host;
int port;