X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=telnet.c;h=8717a9723d3689c3dd9a97304c6b9b3cdbdc09f4;hb=f004bcca17a789356c32527a396b68b71a773db2;hp=3536414c1085194ce3e2f135652a10d1b29ab68b;hpb=38b668648aa0f832600f964d7030879d37d9a302;p=PuTTY.git diff --git a/telnet.c b/telnet.c index 3536414c..8717a972 100644 --- a/telnet.c +++ b/telnet.c @@ -264,7 +264,7 @@ static void option_side_effects(Telnet telnet, const struct Opt *o, int enabled) else if (o->option == TELOPT_SGA && o->send == DO) telnet->editing = !enabled; if (telnet->ldisc) /* cause ldisc to notice the change */ - ldisc_send(telnet->ldisc, NULL, 0, 0); + ldisc_echoedit_update(telnet->ldisc); /* Ensure we get the minimum options */ if (!telnet->activated) { @@ -662,6 +662,7 @@ static void telnet_log(Plug plug, int type, SockAddr addr, int port, msg = dupprintf("Failed to connect to %s: %s", addrbuf, error_msg); logevent(telnet->frontend, msg); + sfree(msg); } static int telnet_closing(Plug plug, const char *error_msg, int error_code, @@ -817,15 +818,10 @@ static const char *telnet_init(void *frontend_handle, void **backend_handle, sfree(*realhost); *realhost = dupstr(loghost); - colon = strrchr(*realhost, ':'); - if (colon) { - /* - * FIXME: if we ever update this aspect of ssh.c for - * IPv6 literal management, this should change in line - * with it. - */ + + colon = host_strrchr(*realhost, ':'); + if (colon) *colon++ = '\0'; - } } return NULL;