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

* src/channel.c (make_exc_finish_channel_handler): New context

argument.
(make_channel_io_exception_handler): -"-
(register_channel): Pass HANDLER_CONTEXT.

Rev: src/channel.c:1.61
Rev: src/channel.h:1.46
parent cd0584d0
......@@ -241,14 +241,17 @@ static void do_exc_finish_channel_handler(struct exception_handler *s,
static struct exception_handler *
make_exc_finish_channel_handler(struct channel_table *table,
UINT32 channel_number,
struct exception_handler *e)
struct exception_handler *e,
const char *context)
{
NEW(exc_finish_channel_handler, self);
self->table = table;
self->channel_number = channel_number;
self->super.parent = e;
self->super.raise = do_exc_finish_channel_handler;
self->super.context = context;
self->table = table;
self->channel_number = channel_number;
return &self->super;
}
......@@ -361,7 +364,8 @@ register_channel(struct ssh_connection *connection,
/* FIXME: Is this the right place to install this exception handler? */
channel->e = make_exc_finish_channel_handler(table,
local_channel_number,
connection->e);
connection->e,
HANDLER_CONTEXT);
REMEMBER_RESOURCE(connection->resources, &channel->resources->super);
}
......@@ -1724,11 +1728,14 @@ do_channel_io_exception_handler(struct exception_handler *s,
struct exception_handler *
make_channel_io_exception_handler(struct ssh_channel *channel,
const char *prefix,
struct exception_handler *parent)
struct exception_handler *parent,
const char *context)
{
NEW(channel_io_exception_handler, self);
self->super.raise = do_channel_io_exception_handler;
self->super.parent = parent;
self->super.context = context;
self->channel = channel;
self->prefix = prefix;
......
......@@ -338,7 +338,8 @@ make_channel_read_close_callback(struct ssh_channel *channel);
struct exception_handler *
make_channel_io_exception_handler(struct ssh_channel *channel,
const char *prefix,
struct exception_handler *parent);
struct exception_handler *parent,
const char *context);
struct lsh_string *channel_transmit_data(struct ssh_channel *channel,
struct lsh_string *data);
......
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