mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 09:58:01 +00:00
Stop plink losing data at start of session
[originally from svn r577]
This commit is contained in:
parent
be711d9cd4
commit
4109ac3dfc
1
putty.h
1
putty.h
@ -110,6 +110,7 @@ typedef struct {
|
|||||||
void (*size) (void);
|
void (*size) (void);
|
||||||
void (*special) (Telnet_Special code);
|
void (*special) (Telnet_Special code);
|
||||||
SOCKET (*socket) (void);
|
SOCKET (*socket) (void);
|
||||||
|
int (*sendok) (void);
|
||||||
} Backend;
|
} Backend;
|
||||||
|
|
||||||
GLOBAL Backend *back;
|
GLOBAL Backend *back;
|
||||||
|
7
raw.c
7
raw.c
@ -215,7 +215,9 @@ static void raw_special (Telnet_Special code) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
SOCKET raw_socket(void) { return s; }
|
static SOCKET raw_socket(void) { return s; }
|
||||||
|
|
||||||
|
static int raw_sendok(void) { return 1; }
|
||||||
|
|
||||||
Backend raw_backend = {
|
Backend raw_backend = {
|
||||||
raw_init,
|
raw_init,
|
||||||
@ -223,5 +225,6 @@ Backend raw_backend = {
|
|||||||
raw_send,
|
raw_send,
|
||||||
raw_size,
|
raw_size,
|
||||||
raw_special,
|
raw_special,
|
||||||
raw_socket
|
raw_socket,
|
||||||
|
raw_sendok
|
||||||
};
|
};
|
||||||
|
11
ssh.c
11
ssh.c
@ -163,6 +163,7 @@ static struct ssh_hostkey *hostkey = NULL;
|
|||||||
int (*ssh_get_password)(const char *prompt, char *str, int maxlen) = NULL;
|
int (*ssh_get_password)(const char *prompt, char *str, int maxlen) = NULL;
|
||||||
|
|
||||||
static char *savedhost;
|
static char *savedhost;
|
||||||
|
static int ssh_send_ok;
|
||||||
|
|
||||||
static enum {
|
static enum {
|
||||||
SSH_STATE_BEFORE_SIZE,
|
SSH_STATE_BEFORE_SIZE,
|
||||||
@ -990,6 +991,7 @@ static int do_ssh_init(void) {
|
|||||||
ssh_version = 1;
|
ssh_version = 1;
|
||||||
s_rdpkt = ssh1_rdpkt;
|
s_rdpkt = ssh1_rdpkt;
|
||||||
}
|
}
|
||||||
|
ssh_send_ok = 0;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1411,6 +1413,7 @@ static void ssh1_protocol(unsigned char *in, int inlen, int ispkt) {
|
|||||||
if (size_needed)
|
if (size_needed)
|
||||||
ssh_size();
|
ssh_size();
|
||||||
|
|
||||||
|
ssh_send_ok = 1;
|
||||||
while (1) {
|
while (1) {
|
||||||
crReturnV;
|
crReturnV;
|
||||||
if (ispkt) {
|
if (ispkt) {
|
||||||
@ -1976,6 +1979,7 @@ static void do_ssh2_authconn(unsigned char *in, int inlen, int ispkt)
|
|||||||
/*
|
/*
|
||||||
* Transfer data!
|
* Transfer data!
|
||||||
*/
|
*/
|
||||||
|
ssh_send_ok = 1;
|
||||||
while (1) {
|
while (1) {
|
||||||
crReturnV;
|
crReturnV;
|
||||||
if (ispkt) {
|
if (ispkt) {
|
||||||
@ -2312,7 +2316,9 @@ char *ssh_scp_init(char *host, int port, char *cmd, char **realhost)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
SOCKET ssh_socket(void) { return s; }
|
static SOCKET ssh_socket(void) { return s; }
|
||||||
|
|
||||||
|
static int ssh_sendok(void) { return ssh_send_ok; }
|
||||||
|
|
||||||
Backend ssh_backend = {
|
Backend ssh_backend = {
|
||||||
ssh_init,
|
ssh_init,
|
||||||
@ -2320,5 +2326,6 @@ Backend ssh_backend = {
|
|||||||
ssh_send,
|
ssh_send,
|
||||||
ssh_size,
|
ssh_size,
|
||||||
ssh_special,
|
ssh_special,
|
||||||
ssh_socket
|
ssh_socket,
|
||||||
|
ssh_sendok
|
||||||
};
|
};
|
||||||
|
7
telnet.c
7
telnet.c
@ -732,7 +732,9 @@ static void telnet_special (Telnet_Special code) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SOCKET telnet_socket(void) { return s; }
|
static SOCKET telnet_socket(void) { return s; }
|
||||||
|
|
||||||
|
static int telnet_sendok(void) { return 1; }
|
||||||
|
|
||||||
Backend telnet_backend = {
|
Backend telnet_backend = {
|
||||||
telnet_init,
|
telnet_init,
|
||||||
@ -740,5 +742,6 @@ Backend telnet_backend = {
|
|||||||
telnet_send,
|
telnet_send,
|
||||||
telnet_size,
|
telnet_size,
|
||||||
telnet_special,
|
telnet_special,
|
||||||
telnet_socket
|
telnet_socket,
|
||||||
|
telnet_sendok
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user