-const char jcc_rcs[] = "$Id: jcc.c,v 1.283 2009/09/05 18:04:37 fabiankeil Exp $";
+const char jcc_rcs[] = "$Id: jcc.c,v 1.287 2009/09/09 17:12:08 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/jcc.c,v $
}
+#ifdef FEATURE_CONNECTION_SHARING
/*********************************************************************
*
* Function : wait_for_alive_connections
log_error(LOG_LEVEL_CONNECT, "No connections to wait for left.");
}
+#endif /* def FEATURE_CONNECTION_SHARING */
/*********************************************************************
else
#endif /* def FEATURE_CONNECTION_KEEP_ALIVE */
{
-#ifdef FEATURE_CONNECTION_KEEP_ALIVE
- if (http->ssl == 0)
- {
- log_error(LOG_LEVEL_CONNECT,
- "Allowing the client to continue talking. "
- "Expecting %llu bytes.", csp->expected_client_content_length);
- }
-#endif /* def FEATURE_CONNECTION_KEEP_ALIVE */
FD_SET(csp->cfd, &rfds);
}
*/
if (FD_ISSET(csp->cfd, &rfds))
{
- unsigned max_bytes_to_read = sizeof(buf) - 1;
+ int max_bytes_to_read = sizeof(buf) - 1;
#ifdef FEATURE_CONNECTION_KEEP_ALIVE
if (csp->expected_client_content_length != 0)
{
if (csp->expected_client_content_length < (sizeof(buf) - 1))
{
- max_bytes_to_read = csp->expected_client_content_length;
+ max_bytes_to_read = (int)csp->expected_client_content_length;
}
log_error(LOG_LEVEL_CONNECT,
"Waiting for up to %d bytes from the client.",
if (csp->expected_client_content_length != 0)
{
assert(len <= max_bytes_to_read);
- csp->expected_client_content_length -= len;
+ csp->expected_client_content_length -= (unsigned)len;
log_error(LOG_LEVEL_CONNECT,
"Expected client content length set to %llu "
"after reading %d bytes.",
#endif /* def AMIGA */
{
#ifdef FEATURE_CONNECTION_KEEP_ALIVE
+#ifdef FEATURE_CONNECTION_SHARING
static int monitor_thread_running = 0;
+#endif /* def FEATURE_CONNECTION_SHARING */
int continue_chatting = 0;
unsigned int latency = 0;
{
log_error(LOG_LEVEL_CONNECT,
"No additional client request received in time.");
+#ifdef FEATURE_CONNECTION_SHARING
if ((csp->config->feature_flags & RUNTIME_FEATURE_CONNECTION_SHARING)
&& (socket_is_still_usable(csp->sfd)))
{
}
privoxy_mutex_unlock(&connection_reuse_mutex);
}
+#endif /* def FEATURE_CONNECTION_SHARING */
break;
}
}
if (csp->sfd != JB_INVALID_SOCKET)
{
-#ifdef FEATURE_CONNECTION_KEEP_ALIVE
+#ifdef FEATURE_CONNECTION_SHARING
forget_connection(csp->sfd);
-#endif /* def FEATURE_CONNECTION_KEEP_ALIVE */
+#endif /* def FEATURE_CONNECTION_SHARING */
close_socket(csp->sfd);
}
*
*********************************************************************/
#ifdef __MINGW32__
-int real_main(int argc, const char *argv[])
+int real_main(int argc, char **argv)
#else
-int main(int argc, const char *argv[])
+int main(int argc, char **argv)
#endif
{
int argc_pos = 0;
config = load_config();
-#ifdef FEATURE_CONNECTION_KEEP_ALIVE
+#ifdef FEATURE_CONNECTION_SHARING
/*
* XXX: Should be relocated once it no
* longer needs to emit log messages.
*/
initialize_reusable_connections();
-#endif /* def FEATURE_CONNECTION_KEEP_ALIVE */
+#endif /* def FEATURE_CONNECTION_SHARING */
bfd = bind_port_helper(config);