1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

Stop plink losing data at start of session

[originally from svn r577]
This commit is contained in:
Simon Tatham 2000-09-08 16:42:11 +00:00
parent be711d9cd4
commit 4109ac3dfc
4 changed files with 20 additions and 6 deletions

View File

@ -110,6 +110,7 @@ typedef struct {
void (*size) (void);
void (*special) (Telnet_Special code);
SOCKET (*socket) (void);
int (*sendok) (void);
} Backend;
GLOBAL Backend *back;

7
raw.c
View File

@ -215,7 +215,9 @@ static void raw_special (Telnet_Special code) {
return;
}
SOCKET raw_socket(void) { return s; }
static SOCKET raw_socket(void) { return s; }
static int raw_sendok(void) { return 1; }
Backend raw_backend = {
raw_init,
@ -223,5 +225,6 @@ Backend raw_backend = {
raw_send,
raw_size,
raw_special,
raw_socket
raw_socket,
raw_sendok
};

11
ssh.c
View File

@ -163,6 +163,7 @@ static struct ssh_hostkey *hostkey = NULL;
int (*ssh_get_password)(const char *prompt, char *str, int maxlen) = NULL;
static char *savedhost;
static int ssh_send_ok;
static enum {
SSH_STATE_BEFORE_SIZE,
@ -990,6 +991,7 @@ static int do_ssh_init(void) {
ssh_version = 1;
s_rdpkt = ssh1_rdpkt;
}
ssh_send_ok = 0;
return 1;
}
@ -1411,6 +1413,7 @@ static void ssh1_protocol(unsigned char *in, int inlen, int ispkt) {
if (size_needed)
ssh_size();
ssh_send_ok = 1;
while (1) {
crReturnV;
if (ispkt) {
@ -1976,6 +1979,7 @@ static void do_ssh2_authconn(unsigned char *in, int inlen, int ispkt)
/*
* Transfer data!
*/
ssh_send_ok = 1;
while (1) {
crReturnV;
if (ispkt) {
@ -2312,7 +2316,9 @@ char *ssh_scp_init(char *host, int port, char *cmd, char **realhost)
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 = {
ssh_init,
@ -2320,5 +2326,6 @@ Backend ssh_backend = {
ssh_send,
ssh_size,
ssh_special,
ssh_socket
ssh_socket,
ssh_sendok
};

View File

@ -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 = {
telnet_init,
@ -740,5 +742,6 @@ Backend telnet_backend = {
telnet_send,
telnet_size,
telnet_special,
telnet_socket
telnet_socket,
telnet_sendok
};