mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 09:58:01 +00:00
windows: Make select_result() return void.
Nothing now uses its return value anyway.
This commit is contained in:
parent
70e2e140f0
commit
a2fb1d96ef
@ -1625,9 +1625,9 @@ static void sk_tcp_write_eof(Socket sock)
|
||||
try_send(s);
|
||||
}
|
||||
|
||||
int select_result(WPARAM wParam, LPARAM lParam)
|
||||
void select_result(WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
int ret, open;
|
||||
int ret;
|
||||
DWORD err;
|
||||
char buf[20480]; /* nice big buffer for plenty of speed */
|
||||
Actual_Socket s;
|
||||
@ -1636,11 +1636,11 @@ int select_result(WPARAM wParam, LPARAM lParam)
|
||||
/* wParam is the socket itself */
|
||||
|
||||
if (wParam == 0)
|
||||
return 1; /* boggle */
|
||||
return; /* boggle */
|
||||
|
||||
s = find234(sktree, (void *) wParam, cmpforsearch);
|
||||
if (!s)
|
||||
return 1; /* boggle */
|
||||
return; /* boggle */
|
||||
|
||||
if ((err = WSAGETSELECTERROR(lParam)) != 0) {
|
||||
/*
|
||||
@ -1657,9 +1657,8 @@ int select_result(WPARAM wParam, LPARAM lParam)
|
||||
}
|
||||
}
|
||||
if (err != 0)
|
||||
return plug_closing(s->plug, winsock_error_string(err), err, 0);
|
||||
else
|
||||
return 1;
|
||||
plug_closing(s->plug, winsock_error_string(err), err, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
noise_ultralight(lParam);
|
||||
@ -1712,12 +1711,11 @@ int select_result(WPARAM wParam, LPARAM lParam)
|
||||
}
|
||||
}
|
||||
if (ret < 0) {
|
||||
return plug_closing(s->plug, winsock_error_string(err), err,
|
||||
0);
|
||||
plug_closing(s->plug, winsock_error_string(err), err, 0);
|
||||
} else if (0 == ret) {
|
||||
return plug_closing(s->plug, NULL, 0, 0);
|
||||
plug_closing(s->plug, NULL, 0, 0);
|
||||
} else {
|
||||
return plug_receive(s->plug, atmark ? 0 : 1, buf, ret);
|
||||
plug_receive(s->plug, atmark ? 0 : 1, buf, ret);
|
||||
}
|
||||
break;
|
||||
case FD_OOB:
|
||||
@ -1737,7 +1735,7 @@ int select_result(WPARAM wParam, LPARAM lParam)
|
||||
logevent(NULL, str);
|
||||
fatalbox("%s", str);
|
||||
} else {
|
||||
return plug_receive(s->plug, 2, buf, ret);
|
||||
plug_receive(s->plug, 2, buf, ret);
|
||||
}
|
||||
break;
|
||||
case FD_WRITE:
|
||||
@ -1753,23 +1751,20 @@ int select_result(WPARAM wParam, LPARAM lParam)
|
||||
break;
|
||||
case FD_CLOSE:
|
||||
/* Signal a close on the socket. First read any outstanding data. */
|
||||
open = 1;
|
||||
do {
|
||||
ret = p_recv(s->s, buf, sizeof(buf), 0);
|
||||
if (ret < 0) {
|
||||
err = p_WSAGetLastError();
|
||||
if (err == WSAEWOULDBLOCK)
|
||||
break;
|
||||
return plug_closing(s->plug, winsock_error_string(err),
|
||||
err, 0);
|
||||
plug_closing(s->plug, winsock_error_string(err), err, 0);
|
||||
} else {
|
||||
if (ret)
|
||||
open &= plug_receive(s->plug, 0, buf, ret);
|
||||
plug_receive(s->plug, 0, buf, ret);
|
||||
else
|
||||
open &= plug_closing(s->plug, NULL, 0, 0);
|
||||
plug_closing(s->plug, NULL, 0, 0);
|
||||
}
|
||||
} while (ret > 0);
|
||||
return open;
|
||||
case FD_ACCEPT:
|
||||
{
|
||||
#ifdef NO_IPV6
|
||||
@ -1807,8 +1802,6 @@ int select_result(WPARAM wParam, LPARAM lParam)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -284,7 +284,7 @@ GLOBAL void *logctx;
|
||||
/*
|
||||
* Exports from winnet.c.
|
||||
*/
|
||||
extern int select_result(WPARAM, LPARAM);
|
||||
extern void select_result(WPARAM, LPARAM);
|
||||
|
||||
/*
|
||||
* winnet.c dynamically loads WinSock 2 or WinSock 1 depending on
|
||||
|
Loading…
Reference in New Issue
Block a user