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

(channel_open_x11): Define as a static object

using DEFINE_CHANNEL_OPEN. Updated users.

Rev: src/client.c:1.131
Rev: src/client.h:1.46
Rev: src/client_x11.c:1.14
parent d9907186
......@@ -1058,7 +1058,7 @@ client_argp_parser(int key, char *arg, struct argp_state *state)
client_add_action(options,
make_install_fix_channel_open_handler
(ATOM_X11,
make_channel_open_x11()));
&channel_open_x11));
/* Install suspend-handler */
suspend_install_handler();
......
......@@ -101,9 +101,7 @@ make_exec_request(struct lsh_string *command);
struct command *
make_pty_request(struct interact *tty);
struct channel_open *
make_channel_open_x11(void);
extern struct channel_open channel_open_x11;
struct command *
make_forward_x11(const char *display_string,
......
......@@ -423,17 +423,14 @@ make_exc_x11_connect_handler(struct exception_handler *parent,
return make_exception_handler(do_exc_x11_connect_handler, parent, context);
}
/* FIXME: Use a static object? */
static void
do_channel_open_x11(struct channel_open *s,
struct ssh_connection *connection,
struct channel_open_info *info UNUSED,
struct simple_buffer *args,
struct command_continuation *c,
struct exception_handler *e)
DEFINE_CHANNEL_OPEN(channel_open_x11)
(struct channel_open *s UNUSED,
struct ssh_connection *connection,
struct channel_open_info *info UNUSED,
struct simple_buffer *args,
struct command_continuation *c,
struct exception_handler *e)
{
CAST(channel_open_x11, self, s);
UINT32 originator_length;
const UINT8 *originator;
UINT32 originator_port;
......@@ -479,16 +476,6 @@ do_channel_open_x11(struct channel_open *s,
}
}
struct channel_open *
make_channel_open_x11(void)
{
NEW(channel_open_x11, self);
self->super.handler = do_channel_open_x11;
return &self->super;
}
/* Format is host:display.screen, where display and screen are numbers */
static int
......
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