-const char gateway_rcs[] = "$Id: gateway.c,v 1.74 2011/07/17 13:31:35 fabiankeil Exp $";
+const char gateway_rcs[] = "$Id: gateway.c,v 1.78 2011/09/18 14:42:43 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/gateway.c,v $
#include "miscutil.h"
#ifdef FEATURE_CONNECTION_KEEP_ALIVE
#ifdef HAVE_POLL
-#ifdef __GLIBC__
+#ifdef __GLIBC__
#include <sys/poll.h>
#else
#include <poll.h>
sfd, reusable_connection[slot].host,
reusable_connection[slot].port, slot);
mark_connection_closed(&reusable_connection[slot]);
- privoxy_mutex_unlock(&connection_reuse_mutex);
-
- return;
+ break;
}
}
- log_error(LOG_LEVEL_CONNECT,
- "Socket %d already forgotten or never remembered.", sfd);
-
privoxy_mutex_unlock(&connection_reuse_mutex);
+
}
#endif /* def FEATURE_CONNECTION_SHARING */
default:
/* Should never get here */
log_error(LOG_LEVEL_FATAL,
- "SOCKS4 impossible internal error - bad SOCKS type.");
+ "Internal error in forwarded_connect(). Bad proxy type: %d", fwd->type);
}
if (JB_INVALID_SOCKET != sfd)
if (err)
{
log_error(LOG_LEVEL_CONNECT, "socks4_connect: %s", errstr);
- csp->error_message = strdup(errstr);
+ csp->error_message = strdup(errstr);
errno = EINVAL;
return(JB_INVALID_SOCKET);
}
if (err)
{
- csp->error_message = strdup(errstr);
+ csp->error_message = strdup(errstr);
return(JB_INVALID_SOCKET);
}
if (write_socket(sfd, cbuf, client_pos))
{
- errstr = "SOCKS5 negotiation read failed";
+ errstr = "SOCKS5 negotiation write failed";
csp->error_message = strdup(errstr);
log_error(LOG_LEVEL_CONNECT, "%s", errstr);
close_socket(sfd);