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

* src/io.c (make_connect_callback): Made non-static.

(io_connect): Changed interface, to take an io_callback instead of
a continuation. The caller has to use make_connect_callback to get
the old functionality.
(io_connect_local): Adapted to new io_conenct interface, and call
make_connect_list_callback.
* src/client_x11.c (channel_open_x11): Likewise.
* src/io_commands.c (do_connect): Likewise.

Rev: src/io_commands.c:1.62
parent f921560c
...@@ -138,9 +138,9 @@ DEFINE_COMMAND2(listen_list_command) ...@@ -138,9 +138,9 @@ DEFINE_COMMAND2(listen_list_command)
{ {
struct lsh_fd *fd; struct lsh_fd *fd;
debug("listen_list_command: Trying to bind address of type %i\n", debug("listen_list_command: Trying to bind address of type %i\n",
list->addr->sa_family); list->address->sa_family);
fd = io_bind_sockaddr(list->addr, list->length, e); fd = io_bind_sockaddr(list->address, list->length, e);
if (fd) if (fd)
{ {
if (io_listen(fd, callback)) if (io_listen(fd, callback))
...@@ -233,6 +233,7 @@ do_connect_continuation(struct command_continuation *c, ...@@ -233,6 +233,7 @@ do_connect_continuation(struct command_continuation *c,
COMMAND_RETURN(self->up, make_listen_value(fd, self->target, fd2info(fd,0))); COMMAND_RETURN(self->up, make_listen_value(fd, self->target, fd2info(fd,0)));
} }
/* FIXME: Return an io_callback instead */
static struct command_continuation * static struct command_continuation *
make_connect_continuation(struct address_info *target, make_connect_continuation(struct address_info *target,
struct command_continuation *up) struct command_continuation *up)
...@@ -269,7 +270,8 @@ do_connect(struct address_info *a, ...@@ -269,7 +270,8 @@ do_connect(struct address_info *a,
/* If the name is canonicalized in any way, we should pass the /* If the name is canonicalized in any way, we should pass the
* canonical name to make_connect_continuation .*/ * canonical name to make_connect_continuation .*/
fd = io_connect(addr, addr_length, fd = io_connect(addr, addr_length,
make_connect_continuation(a, c), e); make_connect_callback(make_connect_continuation(a, c)),
e);
lsh_space_free(addr); lsh_space_free(addr);
if (!fd) if (!fd)
......
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