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

* src/io.c (kill_io_fd_resource): New function, replacing

kill_io_connect_state and kill_io_listen_port.
(init_io_connect_state): Updated for new super class
io_fd_resource.
(oop_io_connect): Likewise.
(io_connect): Likewise.
(init_io_listen_port): Likewise.
(oop_io_accept): Likewise.
(io_listen): Likewise.
* src/client_tcpforward.c (do_forward_local_port): Likewise.
* src/client_x11.c (x11_connect): Likewise.
* src/gateway.c (do_gateway_port_accept): Likewise.
(make_gateway_port): Likewise.

Rev: src/gateway.c:1.24
parent ed6c071a
......@@ -272,8 +272,8 @@ gateway_disconnect(struct gateway_connection *connection,
gateway_write_packet(connection,
format_disconnect(reason, msg, ""));
/* FIXME: If the disconnect message could not be written
immediately, it will be lost. */
/* NOTE: If the disconnect message could not be written immediately,
it will be lost. */
KILL_RESOURCE(&connection->super.super);
}
......@@ -348,7 +348,6 @@ oop_read_gateway(oop_source *source UNUSED, int fd, oop_event event, void *state
msg = packet[0];
if (msg < SSH_FIRST_CONNECTION_GENERIC)
/* FIXME: We might want to handle SSH_MSG_UNIMPLEMENTED. */
gateway_disconnect(self, SSH_DISCONNECT_BY_APPLICATION,
"lsh received a transport or userauth layer packet from a gateway");
......@@ -446,7 +445,7 @@ do_gateway_port_accept(struct io_listen_port *s,
struct gateway_connection *gateway
= make_gateway_connection(self->connection,
&self->super.super, fd);
&self->super.super.super, fd);
int error = gateway_write_data (gateway, sizeof(hello), hello);
if (error)
......@@ -483,10 +482,10 @@ make_gateway_port(const struct local_info *local,
self->connection = connection;
if (io_listen(&self->super))
return &self->super.super;
return &self->super.super.super;
else
{
KILL_RESOURCE(&self->super.super);
KILL_RESOURCE(&self->super.super.super);
return NULL;
}
}
......
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