mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-25 01:02:24 +00:00
Ensure all backends _remember_ the connection has closed after
receiving a network error. Should prevent the cascading-error-box bug. [originally from svn r900]
This commit is contained in:
parent
0d0c8a5e2e
commit
62a76699ad
3
raw.c
3
raw.c
@ -24,9 +24,10 @@ static void c_write (char *buf, int len) {
|
||||
from_backend(0, buf, len);
|
||||
}
|
||||
|
||||
static int raw_receive (Socket s, int urgent, char *data, int len) {
|
||||
static int raw_receive (Socket skt, int urgent, char *data, int len) {
|
||||
if (urgent==3) {
|
||||
/* A socket error has occurred. */
|
||||
s = NULL;
|
||||
connection_fatal(data);
|
||||
len = 0;
|
||||
}
|
||||
|
3
rlogin.c
3
rlogin.c
@ -24,9 +24,10 @@ static void c_write (char *buf, int len) {
|
||||
from_backend(0, buf, len);
|
||||
}
|
||||
|
||||
static int rlogin_receive (Socket s, int urgent, char *data, int len) {
|
||||
static int rlogin_receive (Socket skt, int urgent, char *data, int len) {
|
||||
if (urgent==3) {
|
||||
/* A socket error has occurred. */
|
||||
s = NULL;
|
||||
connection_fatal(data);
|
||||
len = 0;
|
||||
}
|
||||
|
2
ssh.c
2
ssh.c
@ -1151,6 +1151,8 @@ static void ssh_gotdata(unsigned char *data, int datalen)
|
||||
static int ssh_receive(Socket skt, int urgent, char *data, int len) {
|
||||
if (urgent==3) {
|
||||
/* A socket error has occurred. */
|
||||
ssh_state = SSH_STATE_CLOSED;
|
||||
s = NULL;
|
||||
connection_fatal(data);
|
||||
len = 0;
|
||||
}
|
||||
|
3
telnet.c
3
telnet.c
@ -465,9 +465,10 @@ static void do_telnet_read (char *buf, int len) {
|
||||
}
|
||||
}
|
||||
|
||||
static int telnet_receive(Socket s, int urgent, char *data, int len) {
|
||||
static int telnet_receive(Socket skt, int urgent, char *data, int len) {
|
||||
if (urgent==3) {
|
||||
/* A socket error has occurred. */
|
||||
s = NULL;
|
||||
connection_fatal(data);
|
||||
len = 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user