Commit 4e959964 authored by Balázs Scheidler's avatar Balázs Scheidler Committed by Niels Möller
Browse files

* src/io.c (io_read_write): Changed return type to struct io_fd *

(Bazsi).

Rev: src/client.c:1.55
Rev: src/io.c:1.49
Rev: src/io.h:1.29
parent 47f003c6
......@@ -78,10 +78,11 @@ static int client_initiate(struct fd_callback **c,
= make_ssh_connection(closure->kexinit_handler);
connection_init_io(connection,
io_read_write(closure->backend, fd,
make_client_read_line(connection),
closure->block_size,
make_client_close_handler()),
&io_read_write(closure->backend, fd,
make_client_read_line(connection),
closure->block_size,
make_client_close_handler())
->buffer->super,
closure->random);
connection->versions[CONNECTION_CLIENT]
......@@ -91,7 +92,8 @@ static int client_initiate(struct fd_callback **c,
closure->id_comment);
res = A_WRITE(connection->raw,
ssh_format("%lS\r\n", connection->versions[CONNECTION_CLIENT]));
ssh_format("%lS\r\n",
connection->versions[CONNECTION_CLIENT]));
if (LSH_CLOSEDP(res))
return res;
......@@ -544,28 +546,6 @@ static int do_io(struct ssh_channel *channel)
return LSH_OK | LSH_CHANNEL_READY_SEND;
}
#if 0
static int do_next_request(struct ssh_channel *c)
{
CAST(client_session, closure, c);
struct channel_request_descriptor *req;
req = (struct channel_request_descriptor *) LIST(closure->requests)[closure->current_request];
if (closure->current_request >= ((int) LIST_LENGTH(closure->requests)) - 1)
{
closure->super.channel_success = do_io;
closure->requests = NULL; /* for gc */
}
closure->current_request++;
return A_WRITE(closure->super.write,
format_channel_request(req->request, c, 1,
"%lS", req->args));
}
#endif
static struct request_info *skip_silent_requests(struct request_info *req)
{
while (req && !req->want_reply)
......
......@@ -758,11 +758,11 @@ static void prepare_write(struct lsh_fd *fd)
close_fd(fd, CLOSE_EOF);
}
struct abstract_write *io_read_write(struct io_backend *b,
int fd,
struct read_handler *handler,
UINT32 block_size,
struct close_callback *close_callback)
struct io_fd *io_read_write(struct io_backend *b,
int fd,
struct read_handler *handler,
UINT32 block_size,
struct close_callback *close_callback)
{
NEW(io_fd, f);
struct write_buffer *buffer = write_buffer_alloc(block_size);
......@@ -787,7 +787,7 @@ struct abstract_write *io_read_write(struct io_backend *b,
f->super.really_close = really_close;
f->super.close_callback = close_callback;
return &buffer->super;
return f;
}
struct io_fd *io_read(struct io_backend *b,
......
......@@ -178,11 +178,11 @@ struct listen_fd *io_listen(struct io_backend *b,
struct fd_callback *callback);
struct abstract_write *io_read_write(struct io_backend *b,
int fd,
struct read_handler *read_callback,
UINT32 block_size,
struct close_callback *close_callback);
struct io_fd *io_read_write(struct io_backend *b,
int fd,
struct read_handler *read_callback,
UINT32 block_size,
struct close_callback *close_callback);
struct io_fd *io_read(struct io_backend *b,
int fd,
......
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