projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Stop plink losing data at start of session
[u/mdw/putty]
/
ssh.c
diff --git
a/ssh.c
b/ssh.c
index
7e02bac
..
82d61e9
100644
(file)
--- a/
ssh.c
+++ b/
ssh.c
@@
-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;
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,
static enum {
SSH_STATE_BEFORE_SIZE,
@@
-990,6
+991,7
@@
static int do_ssh_init(void) {
ssh_version = 1;
s_rdpkt = ssh1_rdpkt;
}
ssh_version = 1;
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)
ssh_size();
if (size_needed)
ssh_size();
+ ssh_send_ok = 1;
while (1) {
crReturnV;
if (ispkt) {
while (1) {
crReturnV;
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) {
crReturnV;
if (ispkt) {
while (1) {
crReturnV;
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 = {
ssh_init,
Backend ssh_backend = {
ssh_init,
@@
-2320,5
+2326,6
@@
Backend ssh_backend = {
ssh_send,
ssh_size,
ssh_special,
ssh_send,
ssh_size,
ssh_special,
- ssh_socket
+ ssh_socket,
+ ssh_sendok
};
};