char *err;
Rlogin rlogin;
- rlogin = smalloc(sizeof(*rlogin));
+ rlogin = snew(struct rlogin_tag);
rlogin->fn = &fn_table;
rlogin->s = NULL;
rlogin->frontend = frontend_handle;
return;
}
+/*
+ * Return a list of the special codes that make sense in this
+ * protocol.
+ */
+static const struct telnet_special *rlogin_get_specials(void *handle)
+{
+ return NULL;
+}
+
static Socket rlogin_socket(void *handle)
{
Rlogin rlogin = (Rlogin) handle;
static int rlogin_exitcode(void *handle)
{
- /* Rlogin rlogin = (Rlogin) handle; */
- /* If we ever implement RSH, we'll probably need to do this properly */
- return 0;
+ Rlogin rlogin = (Rlogin) handle;
+ if (rlogin->s != NULL)
+ return -1; /* still connected */
+ else
+ /* If we ever implement RSH, we'll probably need to do this properly */
+ return 0;
}
Backend rlogin_backend = {
rlogin_sendbuffer,
rlogin_size,
rlogin_special,
+ rlogin_get_specials,
rlogin_socket,
rlogin_exitcode,
rlogin_sendok,