return NULL;
}
+static void telnet_free(void *handle)
+{
+ Telnet telnet = (Telnet) handle;
+
+ sfree(telnet->sb_buf);
+ if (telnet->s)
+ sk_close(telnet->s);
+ sfree(telnet);
+}
/*
* Reconfigure the Telnet backend. There's no immediate action
* necessary, in this backend: we just save the fresh config for
{
Telnet telnet = (Telnet) handle;
unsigned char *p, *end;
- static unsigned char iac[2] = { IAC, IAC };
- static unsigned char cr[2] = { CR, NUL };
+ static const unsigned char iac[2] = { IAC, IAC };
+ static const unsigned char cr[2] = { CR, NUL };
#if 0
- static unsigned char nl[2] = { CR, LF };
+ static const unsigned char nl[2] = { CR, LF };
#endif
if (telnet->s == NULL)
Backend telnet_backend = {
telnet_init,
+ telnet_free,
telnet_reconfig,
telnet_send,
telnet_sendbuffer,