Commit 6a61a1ae authored by Niels Möller's avatar Niels Möller
Browse files

* src/connection_commands.c (connection_remember_command): New

command, currently not used.

Rev: src/connection_commands.c:1.4
Rev: src/connection_commands.h:1.3
parent d21d1be6
......@@ -310,3 +310,44 @@ make_handshake_command(int mode,
self->super.call = do_connection;
return &self->super;
}
/* GABA:
(class
(name connection_remember_command)
(super command)
(vars
(connection object ssh_connection)))
*/
static int do_connection_remember(struct command *s,
struct lsh_object *x,
struct command_continuation *c)
{
CAST(connection_remember_command, self, s);
CAST_SUBTYPE(resource, resource, x);
if (resource)
REMEMBER_RESOURCE(self->connection->resources, resource);
return COMMAND_RETURN(c, resource);
}
static struct lsh_object *
collect_connection_remember(struct collect_info_1 *info,
struct lsh_object *x)
{
CAST(ssh_connection, connection, x);
NEW(connection_remember_command, self);
assert(!info);
self->super.call = do_connection_remember;
self->connection = connection;
return &self->super.super;
}
struct collect_info_1 connection_remember_command =
STATIC_COLLECT_1_FINAL(collect_connection_remember);
......@@ -41,4 +41,8 @@ make_handshake_command(int mode,
struct make_kexinit *init,
struct ssh1_fallback *fallback);
extern struct collect_info_1 connection_remember_command;
#define CONNECTION_REMEMBER (&connection_remember_command.super)
#endif /* LSH_CONNECTION_COMMANDS_H_INCLUDED */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment