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

* src/channel.c (connection_service_command): Use DEFINE_COMMAND,

not DEFINE_COMMAND_SIMPLE.
* src/client.c (client_options2remote): Likewise.
(client_options2actions) Likewise.

Rev: src/client.c:1.121
Rev: src/client.h:1.41
parent 4e28d8f0
......@@ -423,23 +423,31 @@ init_client_options(struct client_options *self,
}
/* Host to connect to */
DEFINE_COMMAND_SIMPLE(client_options2remote, a)
DEFINE_COMMAND(client_options2remote)
(struct command *s UNUSED,
struct lsh_object *a,
struct command_continuation *c,
struct exception_handler *e UNUSED)
{
CAST_SUBTYPE(client_options, options, a);
trace("client.c: client_options2remote\n");
return &options->remote->super;
COMMAND_RETURN(c, options->remote);
}
/* Host to connect to */
DEFINE_COMMAND_SIMPLE(client_options2actions, a)
DEFINE_COMMAND(client_options2actions)
(struct command *s UNUSED,
struct lsh_object *a,
struct command_continuation *c,
struct exception_handler *e UNUSED)
{
CAST_SUBTYPE(client_options, options, a);
trace("client.c: client_options2actions, %i actions\n",
options->actions.length);
return &queue_to_list(&options->actions)->super.super;
COMMAND_RETURN(c, queue_to_list(&options->actions));
}
static const struct argp_option
......
......@@ -165,11 +165,11 @@ client_parse_forward_arg(char *arg,
UINT32 *listen_port,
struct address_info **target);
extern struct command_simple client_options2remote;
#define OPTIONS2REMOTE (&client_options2remote.super.super)
extern struct command client_options2remote;
#define OPTIONS2REMOTE (&client_options2remote.super)
extern struct command_simple client_options2actions;
#define OPTIONS2ACTIONS (&client_options2actions.super.super)
extern struct command client_options2actions;
#define OPTIONS2ACTIONS (&client_options2actions.super)
extern const struct argp client_argp;
......
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