Fixes a bug in non blocking connect call

This patch fixes a bug in non blocking connect call where the sock
option length for SO_ERROR was passed as 0 instead of sizeof(int).
This commit is contained in:
Anoop Mohan 2012-05-25 11:59:21 -03:00 committed by Marcelo Roberto Jimenez
parent 4d21d45da7
commit 6db2271ac3
3 changed files with 7 additions and 1 deletions

View File

@ -2,6 +2,11 @@
Version 1.6.18
*******************************************************************************
2012-05-25 Anoop Mohan <anoop.anoop(at)gmail.com>
This patch fixes a bug in non blocking connect call where the sock
option length for SO_ERROR was passed as 0 instead of sizeof(int).
2012-04-24 Yoichi NAKAYAMA <yoichi.nakayama(at)gmail.com>
Disable SetGenaCallback call if device is disabled.

1
THANKS
View File

@ -8,6 +8,7 @@ exempt of errors.
- Alex (afaucher)
- Andre Sodermans (wienerschnitzel)
- Anoop Mohan (an00p)
- Anthony Viallard (homer242)
- Apostolos Syropoulos
- Arno Willig

View File

@ -126,7 +126,7 @@ static int Check_Connect_And_Wait_Connection(
#ifndef WIN32
} else {
int valopt = 0;
socklen_t len = 0;
socklen_t len = sizeof(valopt);
if (getsockopt(sock, SOL_SOCKET, SO_ERROR, (void *) &valopt, &len) < 0) {
/* failed to read delayed error */
return -1;