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

Avoid the ldisc passing zero-length strings to back->send(). VMS

sshd has interesting behaviour on receiving a zero-length SSH data
packet.

[originally from svn r508]
This commit is contained in:
Simon Tatham 2000-06-26 12:55:47 +00:00
parent eb79da11de
commit c9e236eb39

View File

@ -123,7 +123,8 @@ static void term_send(char *buf, int len) {
}
break;
case CTRL('M'): /* send with newline */
back->send(term_buf, term_buflen);
if (term_buflen > 0)
back->send(term_buf, term_buflen);
if (cfg.protocol == PROT_RAW)
back->send("\r\n", 2);
else
@ -153,7 +154,8 @@ static void simple_send(char *buf, int len) {
term_buflen--;
}
}
back->send(buf, len);
if (len > 0)
back->send(buf, len);
}
Ldisc ldisc_term = { term_send };