]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - telnet.c
Merge branch 'pre-0.64'
[PuTTY.git] / telnet.c
index 3536414c1085194ce3e2f135652a10d1b29ab68b..8717a9723d3689c3dd9a97304c6b9b3cdbdc09f4 100644 (file)
--- 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;