zogg socks fix

This commit is contained in:
stskeeps 2002-01-24 18:29:19 +00:00
parent 7a7e2de05c
commit e39a1f9884
3 changed files with 9 additions and 4 deletions

View file

@ -1125,4 +1125,5 @@ v- Fixed some bugreport stuff
- Removed some useless tkl code
- Fixed #0000046 regarding Module_free memory leak
- Added patch in #0000053 by |savage|, speedup in can_send
- Possible fix of #0000042 regarding duplicate scans at same time causing
one to slip through, reported by Zogg

View file

@ -236,7 +236,8 @@ void scan_http_scan_port(HSStruct *z)
*/
set_non_blocking(fd, NULL);
if ((retval = connect(fd, (struct sockaddr *)&sin,
sizeof(sin))) == -1 && ERRNO != P_EINPROGRESS)
sizeof(sin))) == -1 && !((ERRNO == P_EWOULDBLOCK)
|| (ERRNO == P_EINPROGRESS)))
{
/* we have no socks server! */
CLOSE_SOCK(fd);

View file

@ -216,7 +216,8 @@ void scan_socks4_scan(Scan_AddrStruct *h)
*/
set_non_blocking(fd, NULL);
if ((retval = connect(fd, (struct sockaddr *)&sin,
sizeof(sin))) == -1 && ERRNO != P_EINPROGRESS)
sizeof(sin))) == -1 && !((ERRNO == P_EWOULDBLOCK)
|| (ERRNO == P_EINPROGRESS)))
{
/* we have no socks server! */
CLOSE_SOCK(fd);
@ -350,7 +351,9 @@ void scan_socks5_scan(Scan_AddrStruct *h)
*/
set_non_blocking(fd, NULL);
if ((retval = connect(fd, (struct sockaddr *)&sin,
sizeof(sin))) == -1 && ERRNO != P_EINPROGRESS)
sizeof(sin))) == -1 &&
!((ERRNO == P_EWOULDBLOCK)
|| (ERRNO == P_EINPROGRESS)))
{
/* we have no socks server! */
CLOSE_SOCK(fd);