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

* channel_commands.c, combinators.c, connection_commands.c,

io_commands.c, tcpforward.c, tcpforward_commands.c: In collect_*
functions, don't assert that info == NULL. It's info->next that
should be NULL.

Rev: src/channel_commands.c:1.7
Rev: src/combinators.c:1.5
Rev: src/connection_commands.c:1.6
Rev: src/io_commands.c:1.12
Rev: src/tcpforward.c:1.20
Rev: src/tcpforward_commands.c:1.3
parent 1b814677
......@@ -97,7 +97,7 @@ do_install_global_request_handler(struct collect_info_2 *info,
CAST(ssh_connection, connection, a);
CAST_SUBTYPE(global_request, handler, b);
assert(!info);
assert(!info->next);
ALIST_SET(connection->channels->global_requests,
self->name,
handler);
......@@ -114,7 +114,7 @@ do_install_channel_open_handler(struct collect_info_2 *info,
CAST(ssh_connection, connection, a);
CAST_SUBTYPE(channel_open, handler, b);
assert(!info);
assert(!info->next);
ALIST_SET(connection->channels->channel_types,
self->name,
handler);
......
......@@ -166,7 +166,7 @@ struct lsh_object *collect_S_2(struct collect_info_2 *info,
{
CAST_SUBTYPE(command, cf, f);
CAST_SUBTYPE(command, cg, g);
assert(!info);
assert(!info->next);
return &make_command_S_2(cf, cg)->super;
}
......@@ -235,7 +235,7 @@ struct lsh_object *collect_Sp_3(struct collect_info_3 *info,
CAST_SUBTYPE(command, cc, c);
CAST_SUBTYPE(command, cf, f);
CAST_SUBTYPE(command, cg, g);
assert(!info);
assert(!info->next);
return &make_command_Sp_3(cc, cf, cg)->super;
}
......@@ -299,7 +299,7 @@ struct lsh_object *collect_B_2(struct collect_info_2 *info,
{
CAST_SUBTYPE(command, cf, f);
CAST_SUBTYPE(command, cg, g);
assert(!info);
assert(!info->next);
return &make_command_B_2(cf, cg)->super;
}
......@@ -368,7 +368,7 @@ struct lsh_object *collect_Bp_3(struct collect_info_3 *info,
CAST_SUBTYPE(command, cc, c);
CAST_SUBTYPE(command, cf, f);
CAST_SUBTYPE(command, cg, g);
assert(!info);
assert(!info->next);
return &make_command_Bp_3(cc, cf, cg)->super;
}
......@@ -460,7 +460,7 @@ struct lsh_object *collect_C_2(struct collect_info_2 *info,
struct lsh_object *y)
{
CAST_SUBTYPE(command, cf, f);
assert(!info);
assert(!info->next);
return &make_command_C_2(cf, y)->super;
}
......@@ -529,7 +529,7 @@ collect_Cp_3(struct collect_info_3 *info,
{
CAST_SUBTYPE(command, cc, c);
CAST_SUBTYPE(command, cf, f);
assert(!info);
assert(!info->next);
return &make_command_Cp_3(cc, cf, y)->super;
}
......
......@@ -340,7 +340,7 @@ collect_connection_remember(struct collect_info_1 *info,
CAST(ssh_connection, connection, x);
NEW(connection_remember_command, self);
assert(!info);
assert(!info->next);
self->super.call = do_connection_remember;
self->connection = connection;
......
......@@ -153,7 +153,7 @@ collect_listen(struct collect_info_2 *info,
{
CAST(io_backend, backend, a);
CAST_SUBTYPE(command, callback, b);
assert(!info);
assert(!info->next);
return &make_listen_command(callback, backend)->super;
}
......@@ -269,7 +269,7 @@ collect_connect_port(struct collect_info_2 *info,
{
CAST(io_backend, backend, a);
CAST(address_info, target, b);
assert(!info);
assert(!info->next);
assert(backend);
assert(target);
......
......@@ -303,7 +303,6 @@ make_open_forwarded_tcpip_continuation(struct channel_open_callback *response)
(name channel_open_direct_tcpip)
(super channel_open)
(vars
;;(backend object io_backend)
(callback object command)))
*/
......@@ -344,6 +343,7 @@ do_channel_open_direct_tcpip(struct channel_open *c,
*
* COMMAND_CALL(closure->connect_command, port, make_start_io(make_tcpip_channel()))
*/
struct lsh_object *o =
make_direct_tcp_connect(make_simple_connect(closure->backend,
connection->resources),
......@@ -353,7 +353,6 @@ do_channel_open_direct_tcpip(struct channel_open *c,
* to make_tcpip_channel() ? */
make_tcpip_channel(NULL),
SSH_MAX_PACKET));
/* FIXME: implement filtering on original host? */
a = make_address_info(dest_host, dest_port);
......@@ -674,7 +673,7 @@ collect_open_direct_tcp(struct collect_info_2 *info,
CAST(address_info, target, a);
CAST(listen_value, peer, b);
assert(!info);
assert(!info->next);
return &make_open_direct_tcpip_command(target, peer)->super;
}
......@@ -816,7 +815,7 @@ collect_start_forwarded_client_io(struct collect_info_1 *info,
struct lsh_object *x)
{
CAST(remote_listen_value, peer, x);
assert(!info);
assert(!info->next);
return &make_start_forwarded_client_io(peer->c)->super;
}
......
......@@ -102,7 +102,7 @@ do_tcpip_start_io(struct command *s UNUSED,
if (!channel)
{
verbose("Error opening channel.\n");
return NULL;
return COMMAND_RETURN(c, NULL);
}
tcpip_channel_start_io(channel);
......@@ -184,7 +184,7 @@ collect_open_forwarded_tcp(struct collect_info_2 *info,
CAST(address_info, local, a);
CAST(listen_value, peer, b);
assert(!info);
assert(!info->next);
return &make_open_tcpip_command(ATOM_FORWARDED_TCPIP,
local, peer)->super;
......@@ -204,7 +204,7 @@ collect_open_direct_tcp(struct collect_info_2 *info,
CAST(address_info, local, a);
CAST(listen_value, peer, b);
assert(!info);
assert(!info->next);
return &make_open_tcpip_command(ATOM_DIRECT_TCPIP,
local, peer)->super;
......@@ -319,7 +319,7 @@ collect_remote_listen(struct collect_info_2 *info,
{
CAST_SUBTYPE(command, callback, a);
CAST(address_info, port, b);
assert(!info);
assert(!info->next);
return &make_request_tcpip_forward_command(callback, port)->super;
}
......
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