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

* src/channel.c (send_channel_request_responses): Deleted

connection argument.
(make_channel_request_response): Likewise.
(channel_request_exception_handler): Deleted connection attribute.
(make_channel_request_exception_handler): Deleted connection
argument.

Rev: src/channel.c:1.104
parent 78d1a08b
...@@ -367,7 +367,6 @@ use_channel(struct ssh_connection *connection, ...@@ -367,7 +367,6 @@ use_channel(struct ssh_connection *connection,
channel->channel_number, local_channel_number); channel->channel_number, local_channel_number);
} }
/* FIXME: Delete connection argument */
void void
register_channel(UINT32 local_channel_number, register_channel(UINT32 local_channel_number,
struct ssh_channel *channel, struct ssh_channel *channel,
...@@ -688,16 +687,12 @@ DEFINE_PACKET_HANDLER(static, global_failure_handler, ...@@ -688,16 +687,12 @@ DEFINE_PACKET_HANDLER(static, global_failure_handler,
(name channel_request_continuation) (name channel_request_continuation)
(super command_continuation) (super command_continuation)
(vars (vars
;; FIXME: Delete connection argument
(connection object ssh_connection)
(channel object ssh_channel) (channel object ssh_channel)
(active object request_status))) (active object request_status)))
*/ */
/* FIXME: Delete connection argument */
static void static void
send_channel_request_responses(struct ssh_connection *connection, send_channel_request_responses(struct ssh_channel *channel,
struct ssh_channel *channel,
struct object_queue *q) struct object_queue *q)
{ {
for (;;) for (;;)
...@@ -708,7 +703,7 @@ send_channel_request_responses(struct ssh_connection *connection, ...@@ -708,7 +703,7 @@ send_channel_request_responses(struct ssh_connection *connection,
object_queue_remove_head(q); object_queue_remove_head(q);
C_WRITE(connection, C_WRITE(channel->connection,
(n->status (n->status
? format_channel_success(channel->channel_number) ? format_channel_success(channel->channel_number)
: format_channel_failure(channel->channel_number))); : format_channel_failure(channel->channel_number)));
...@@ -727,19 +722,16 @@ do_channel_request_response(struct command_continuation *s, ...@@ -727,19 +722,16 @@ do_channel_request_response(struct command_continuation *s,
self->active->status = 1; self->active->status = 1;
send_channel_request_responses(self->connection, self->channel, q); send_channel_request_responses(self->channel, q);
} }
/* FIXME: Delete connection argument */
static struct command_continuation * static struct command_continuation *
make_channel_request_response(struct ssh_connection *connection, make_channel_request_response(struct ssh_channel *channel,
struct ssh_channel *channel,
struct request_status *active) struct request_status *active)
{ {
NEW(channel_request_continuation, self); NEW(channel_request_continuation, self);
self->super.c = do_channel_request_response; self->super.c = do_channel_request_response;
self->connection = connection;
self->channel = channel; self->channel = channel;
self->active = active; self->active = active;
...@@ -751,8 +743,6 @@ make_channel_request_response(struct ssh_connection *connection, ...@@ -751,8 +743,6 @@ make_channel_request_response(struct ssh_connection *connection,
(name channel_request_exception_handler) (name channel_request_exception_handler)
(super exception_handler) (super exception_handler)
(vars (vars
;; FIXME: Delete connection argument
(connection object ssh_connection)
(channel object ssh_channel) (channel object ssh_channel)
(active object request_status))) (active object request_status)))
*/ */
...@@ -772,16 +762,14 @@ do_exc_channel_request_handler(struct exception_handler *c, ...@@ -772,16 +762,14 @@ do_exc_channel_request_handler(struct exception_handler *c,
self->active->status = 0; self->active->status = 0;
send_channel_request_responses(self->connection, self->channel, q); send_channel_request_responses(self->channel, q);
} }
else else
EXCEPTION_RAISE(c->parent, e); EXCEPTION_RAISE(c->parent, e);
} }
/* FIXME: Delete connection argument */
static struct exception_handler * static struct exception_handler *
make_channel_request_exception_handler(struct ssh_connection *connection, make_channel_request_exception_handler(struct ssh_channel *channel,
struct ssh_channel *channel,
struct request_status *active, struct request_status *active,
struct exception_handler *h, struct exception_handler *h,
const char *context) const char *context)
...@@ -791,7 +779,7 @@ make_channel_request_exception_handler(struct ssh_connection *connection, ...@@ -791,7 +779,7 @@ make_channel_request_exception_handler(struct ssh_connection *connection,
self->super.raise = do_exc_channel_request_handler; self->super.raise = do_exc_channel_request_handler;
self->super.parent = h; self->super.parent = h;
self->super.context = context; self->super.context = context;
self->connection = connection;
self->channel = channel; self->channel = channel;
self->active = active; self->active = active;
...@@ -861,8 +849,8 @@ DEFINE_PACKET_HANDLER(static, channel_request_handler, ...@@ -861,8 +849,8 @@ DEFINE_PACKET_HANDLER(static, channel_request_handler,
object_queue_add_tail(&channel->active_requests, object_queue_add_tail(&channel->active_requests,
&a->super); &a->super);
c = make_channel_request_response(connection, channel, a); c = make_channel_request_response(channel, a);
e = make_channel_request_exception_handler(connection, channel, a, e, HANDLER_CONTEXT); e = make_channel_request_exception_handler(channel, a, e, HANDLER_CONTEXT);
} }
else else
{ {
...@@ -1471,7 +1459,6 @@ DEFINE_PACKET_HANDLER(static, channel_open_confirm_handler, ...@@ -1471,7 +1459,6 @@ DEFINE_PACKET_HANDLER(static, channel_open_confirm_handler,
channel->send_window_size = window_size; channel->send_window_size = window_size;
channel->send_max_packet = max_packet; channel->send_max_packet = max_packet;
/* FIXME: Initialize channel->write here? */
use_channel(connection, local_channel_number); use_channel(connection, local_channel_number);
COMMAND_RETURN(c, channel); COMMAND_RETURN(c, channel);
...@@ -1739,7 +1726,7 @@ init_channel(struct ssh_channel *channel) ...@@ -1739,7 +1726,7 @@ init_channel(struct ssh_channel *channel)
channel->open_continuation = NULL; channel->open_continuation = NULL;
channel->resources = empty_resource_list(); channel->resources = make_resource_list();
object_queue_init(&channel->pending_requests); object_queue_init(&channel->pending_requests);
object_queue_init(&channel->active_requests); object_queue_init(&channel->active_requests);
......
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