X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/0da1a7905bb03d899c94b3d3d9b25c9e61698390..971bcc0afc69f7e754285167e88885c8893d0229:/telnet.c diff --git a/telnet.c b/telnet.c index 6f6deaea..d358f82f 100644 --- a/telnet.c +++ b/telnet.c @@ -643,7 +643,7 @@ static int telnet_closing(Plug plug, char *error_msg, int error_code, if (error_msg) { /* A socket error has occurred. */ logevent(telnet->frontend, error_msg); - connection_fatal("%s", error_msg); + connection_fatal(telnet->frontend, "%s", error_msg); } /* Otherwise, the remote side closed the connection normally. */ return 0; } @@ -955,6 +955,29 @@ static void telnet_special(void *handle, Telnet_Special code) } } +static const struct telnet_special *telnet_get_specials(void *handle) +{ + static const struct telnet_special specials[] = { + {"Are You There", TS_AYT}, + {"Break", TS_BRK}, + {"Synch", TS_SYNCH}, + {"Erase Character", TS_EC}, + {"Erase Line", TS_EL}, + {"Go Ahead", TS_GA}, + {"No Operation", TS_NOP}, + {"", 0}, + {"Abort Process", TS_ABORT}, + {"Abort Output", TS_AO}, + {"Interrupt Process", TS_IP}, + {"Suspend Process", TS_SUSP}, + {"", 0}, + {"End Of Record", TS_EOR}, + {"End Of File", TS_EOF}, + {NULL, 0} + }; + return specials; +} + static Socket telnet_socket(void *handle) { Telnet telnet = (Telnet) handle; @@ -1012,6 +1035,7 @@ Backend telnet_backend = { telnet_sendbuffer, telnet_size, telnet_special, + telnet_get_specials, telnet_socket, telnet_exitcode, telnet_sendok,