X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=gateway.c;h=4207cb7c28ea7567de9ac84e2d3dc9a65d8de5aa;hp=46db1e32f64ec4063481e4f561db6488ecd9c25c;hb=833a71b634dbcaffc39bdd24f6a5f4614bb1c24b;hpb=998def6e7a20bdf0a14b0177d9668a6c76fac19b diff --git a/gateway.c b/gateway.c index 46db1e32..4207cb7c 100644 --- a/gateway.c +++ b/gateway.c @@ -55,10 +55,6 @@ #include #endif /* def __BEOS__ */ -#ifdef __OS2__ -#include -#endif /* def __OS2__ */ - #include "project.h" #include "jcc.h" #include "errlog.h" @@ -78,8 +74,8 @@ #endif /* HAVE_POLL */ #endif /* def FEATURE_CONNECTION_KEEP_ALIVE */ -static jb_socket socks4_connect(const struct forward_spec * fwd, - const char * target_host, +static jb_socket socks4_connect(const struct forward_spec *fwd, + const char *target_host, int target_port, struct client_state *csp); @@ -429,7 +425,7 @@ int close_unusable_connections(void) { log_error(LOG_LEVEL_CONNECT, "The connection to %s:%d in slot %d timed out. " - "Closing socket %d. Timeout is: %d. Assumed latency: %d.", + "Closing socket %d. Timeout is: %d. Assumed latency: %ld.", reusable_connection[slot].host, reusable_connection[slot].port, slot, reusable_connection[slot].sfd, @@ -497,7 +493,7 @@ static jb_socket get_reusable_connection(const struct http_request *http, 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 " + "Found reusable socket %d for %s:%d in slot %d. Timestamp made %ld " "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, @@ -578,11 +574,11 @@ static int mark_connection_unused(const struct reusable_connection *connection) * Returns : JB_INVALID_SOCKET => failure, else it is the socket file descriptor. * *********************************************************************/ -jb_socket forwarded_connect(const struct forward_spec * fwd, +jb_socket forwarded_connect(const struct forward_spec *fwd, struct http_request *http, struct client_state *csp) { - const char * dest_host; + const char *dest_host; int dest_port; jb_socket sfd = JB_INVALID_SOCKET; @@ -713,8 +709,8 @@ extern jb_err socks_fuzz(struct client_state *csp) * Returns : JB_INVALID_SOCKET => failure, else a socket file descriptor. * *********************************************************************/ -static jb_socket socks4_connect(const struct forward_spec * fwd, - const char * target_host, +static jb_socket socks4_connect(const struct forward_spec *fwd, + const char *target_host, int target_port, struct client_state *csp) { @@ -1197,7 +1193,7 @@ static jb_socket socks5_connect(const struct forward_spec *fwd, header_length= strlen(client_headers); log_error(LOG_LEVEL_CONNECT, - "Optimistically sending %d bytes of client headers intended for %s", + "Optimistically sending %lu bytes of client headers intended for %s", header_length, csp->http->hostport); if (write_socket(sfd, client_headers, header_length))