Commit 14b62935 authored by Niels Möller's avatar Niels Möller
Browse files

* src/connection_commands.c (connection_remember): New command.

Rev: src/connection_commands.c:1.21
Rev: src/connection_commands.h:1.8
parent 567a09f7
......@@ -437,9 +437,7 @@ STATIC_COLLECT_2_FINAL(collect_handshake_2);
struct collect_info_1 handshake_command =
STATIC_COLLECT_1(&collect_info_handshake_2);
#if 0
/* ;; GABA:
/* GABA:
(class
(name connection_remember_command)
(super command)
......@@ -447,9 +445,11 @@ STATIC_COLLECT_1(&collect_info_handshake_2);
(connection object ssh_connection)))
*/
static int do_connection_remember(struct command *s,
struct lsh_object *x,
struct command_continuation *c)
static void
do_connection_remember(struct command *s,
struct lsh_object *x,
struct command_continuation *c,
struct exception_handler *e UNUSED)
{
CAST(connection_remember_command, self, s);
CAST_SUBTYPE(resource, resource, x);
......@@ -457,26 +457,18 @@ static int do_connection_remember(struct command *s,
if (resource)
REMEMBER_RESOURCE(self->connection->resources, resource);
return COMMAND_RETURN(c, resource);
COMMAND_RETURN(c, resource);
}
static struct lsh_object *
collect_connection_remember(struct collect_info_1 *info,
struct lsh_object *x)
COMMAND_SIMPLE(connection_remember)
{
CAST(ssh_connection, connection, x);
CAST(ssh_connection, connection, a);
NEW(connection_remember_command, self);
assert(!info->next);
self->super.call = do_connection_remember;
self->connection = connection;
return &self->super.super;
}
struct command connection_remember_command =
STATIC_COMMAND(collect_connection_remember);
#endif
......@@ -68,4 +68,7 @@ struct collect_info_1 handshake_command;
struct close_callback *make_connection_close_handler(struct ssh_connection *c);
struct command_simple connection_remember;
#define CONNECTION_REMEMBER (&connection_remember.super.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