Commit 79905f3c authored by Niels Möller's avatar Niels Möller
Browse files

* src/connection_commands.c (do_connection): Pass HANDLER_CONTEXT.

* src/connection.c (make_exc_protocol_handler): Added context argument.
(connection_init_io): Pass HANDLER_CONTEXT.

Rev: src/connection.c:1.42
Rev: src/connection.h:1.38
Rev: src/connection_commands.c:1.14
parent 997d1359
......@@ -191,12 +191,16 @@ do_exc_protocol_handler(struct exception_handler *s,
struct exception_handler *
make_exc_protocol_handler(struct ssh_connection *connection,
struct exception_handler *parent)
struct exception_handler *parent,
const char *context)
{
NEW(exc_protocol_handler, self);
self->connection = connection;
self->super.parent = parent;
self->super.raise = do_exc_protocol_handler;
self->super.context = context;
self->connection = connection;
return &self->super;
}
......@@ -303,7 +307,7 @@ void connection_init_io(struct ssh_connection *connection,
"Sent");
/* Exception handler that sends a proper disconnect message on protocol errors */
connection->e = make_exc_protocol_handler(connection, e);
connection->e = make_exc_protocol_handler(connection, e, HANDLER_CONTEXT);
/* Initial encryption state */
connection->send_crypto = connection->rec_crypto = NULL;
......
......@@ -129,7 +129,8 @@ struct ssh_connection *make_ssh_connection(struct command_continuation *c);
struct exception_handler *
make_exc_protocol_handler(struct ssh_connection *connection,
struct exception_handler *parent);
struct exception_handler *parent,
const char *context);
void connection_init_io(struct ssh_connection *connection,
struct abstract_write *raw,
......
......@@ -355,7 +355,7 @@ do_connection(struct command *s,
make_connection_close_handler(connection))
->write_buffer->super,
self->random,
make_exc_finish_read_handler(&fd->super, e));
make_exc_finish_read_handler(&fd->super, e, HANDLER_CONTEXT));
connection->versions[self->mode] = version;
connection->kexinits[self->mode] = MAKE_KEXINIT(self->init);
......
Supports Markdown
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