-const char gateway_rcs[] = "$Id: gateway.c,v 1.81 2011/10/23 11:21:09 fabiankeil Exp $";
+const char gateway_rcs[] = "$Id: gateway.c,v 1.82 2011/10/23 11:21:28 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/gateway.c,v $
/* The error an its reason have already been logged by connect_to() */
return(JB_INVALID_SOCKET);
}
+ else if (write_socket(sfd, (char *)c, csiz))
+ {
+ errstr = "SOCKS4 negotiation write failed.";
+ log_error(LOG_LEVEL_CONNECT, "socks4_connect: %s", errstr);
+ err = 1;
+ close_socket(sfd);
+ }
else if (!data_is_available(sfd, csp->config->socket_timeout))
{
if (socket_is_still_alive(sfd))
err = 1;
close_socket(sfd);
}
- else if (write_socket(sfd, (char *)c, csiz))
- {
- errstr = "SOCKS4 negotiation write failed.";
- log_error(LOG_LEVEL_CONNECT, "socks4_connect: %s", errstr);
- err = 1;
- close_socket(sfd);
- }
else if (read_socket(sfd, buf, sizeof(buf)) != sizeof(*s))
{
errstr = "SOCKS4 negotiation read failed.";