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

* src/channel_forward.c (catch_channel_open): Moved here...

* src/tcpforward_commands.c: ...from here.

* src/tcpforward_commands.c (tcpip_connect_io_command): Renamed,
was tcpip_connect_io.
(do_tcpip_start_io): Deleted, replaced by channel_forward_start_io.

Rev: src/channel_forward.c:1.10
Rev: src/channel_forward.h:1.5
Rev: src/tcpforward_commands.c:1.43
parent 73099fc0
......@@ -155,3 +155,10 @@ DEFINE_COMMAND(start_io_command)
COMMAND_RETURN(c, channel);
}
static const struct report_exception_info forward_open_report =
STATIC_REPORT_EXCEPTION_INFO(EXC_ALL, EXC_CHANNEL_OPEN,
"Forwarding failed, coudl not open channel");
struct catch_report_collect catch_channel_open
= STATIC_CATCH_REPORT(&forward_open_report);
......@@ -53,5 +53,11 @@ channel_forward_start_io(struct channel_forward *channel_forward);
extern struct command start_io_command;
#define START_IO (&start_io_command.super)
/* FIXME: Move forward declaration to lsh.h? */
struct catch_report_collect;
extern struct catch_report_collect catch_channel_open;
#define CATCH_CHANNEL_OPEN (&catch_channel_open.super.super)
#endif /* LSH_CHANNEL_FORWARD_H_INCLUDED */
......@@ -68,17 +68,8 @@ static struct install_info install_tcpip_forward_handler;
struct command make_tcpip_forward_handler;
#define TCPIP_FORWARD_HANDLER (&make_tcpip_forward_handler.super)
static struct catch_report_collect catch_channel_open;
#define CATCH_CHANNEL_OPEN (&catch_channel_open.super.super)
#include "tcpforward_commands.c.x"
static const struct report_exception_info open_tcpip_report =
STATIC_REPORT_EXCEPTION_INFO(EXC_ALL, EXC_CHANNEL_OPEN,
"Failed to open tcpip channel");
static struct catch_report_collect catch_channel_open
= STATIC_CATCH_REPORT(&open_tcpip_report);
/* Takes a socket as argument, and returns a tcpip channel. Used by
* the party receiving a open-tcp request, when a channel to the
......
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