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

(start_io_command): New command, to

replace tcpip_start_io.

Rev: src/channel_forward.c:1.8
Rev: src/channel_forward.h:1.3
parent 0285b1d4
......@@ -47,7 +47,8 @@ init_channel_forward(struct channel_forward *self,
init_channel(&self->super);
/* The rest of the callbacks are not set up until tcpip_start_io. */
/* The rest of the callbacks are not set up until
* channel_forward_start_io. */
/* NOTE: We don't need a close handler, as the channel's resource
* list is taken care of automatically. */
......@@ -135,3 +136,17 @@ channel_forward_start_io(struct channel_forward *channel)
channel->socket->write_buffer->report = &channel->super.super;
}
DEFINE_COMMAND(start_io_command)
(struct command *s UNUSED,
struct lsh_object *x,
struct command_continuation *c,
struct exception_handler *e UNUSED)
{
CAST_SUBTYPE(channel_forward, channel, x);
assert(channel);
channel_forward_start_io(channel);
COMMAND_RETURN(c, channel);
}
......@@ -27,6 +27,7 @@
#define LSH_CHANNEL_FORWARD_H_INCLUDED
#include "channel.h"
#include "command.h"
#define GABA_DECLARE
#include "channel_forward.h.x"
......@@ -50,6 +51,8 @@ make_channel_forward(struct lsh_fd *socket, UINT32 initial_window);
void
channel_forward_start_io(struct channel_forward *channel_forward);
extern struct command start_io_command;
#define START_IO (&start_io_command.super)
#endif /* LSH_CHANNEL_FORWARD_H_INCLUDED */
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