X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=telnet.c;h=dc98a7272aac27c5eb72d59d3747b0233214e1d1;hb=54da9ee07a3334b2fb32995f0af4408e6e9edec8;hp=05c9bf64d98c2ad6a6ebea201dbc0792f290f4a7;hpb=a1f3b7a358adaa7c2a98359cd0373aa823eeb14b;p=PuTTY.git diff --git a/telnet.c b/telnet.c index 05c9bf64..dc98a727 100644 --- a/telnet.c +++ b/telnet.c @@ -426,7 +426,7 @@ static void process_subneg(Telnet telnet) logevent(telnet->frontend, logbuf); sfree(logbuf); if (telnet->sb_opt == TELOPT_OLD_ENVIRON) { - if (conf_get_str(telnet->conf, CONF_rfc_environ)) { + if (conf_get_int(telnet->conf, CONF_rfc_environ)) { value = RFC_VALUE; var = RFC_VAR; } else { @@ -667,6 +667,12 @@ static int telnet_closing(Plug plug, const char *error_msg, int error_code, { Telnet telnet = (Telnet) plug; + /* + * We don't implement independent EOF in each direction for Telnet + * connections; as soon as we get word that the remote side has + * sent us EOF, we wind up the whole connection. + */ + if (telnet->s) { sk_close(telnet->s); telnet->s = NULL;