X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fio%2Ftest%2Frun-06-idle.c;h=597060c2b596f80b5a3b5a43e3539f3371a7fa01;hp=e6144dee8c354dab55be9500cdb3318cb56cb5d1;hb=bfb80c566ab695b70a404a419f4b1450a2fcf27a;hpb=0a2fd289c7bf57d9fc35ad6af36df4bcc694f361 diff --git a/ccan/io/test/run-06-idle.c b/ccan/io/test/run-06-idle.c index e6144dee..597060c2 100644 --- a/ccan/io/test/run-06-idle.c +++ b/ccan/io/test/run-06-idle.c @@ -16,19 +16,19 @@ struct data { char buf[4]; }; -static struct io_op *do_read(struct io_conn *conn, struct data *d) +static struct io_plan *plan_read(struct io_conn *conn, struct data *d) { ok1(d->state == 2 || d->state == 3); d->state++; - return io_read(d->buf, sizeof(d->buf), io_next(conn, io_close, d)); + return io_read(conn, d->buf, sizeof(d->buf), io_close, d); } -static struct io_op *start_waker(struct io_conn *conn, struct data *d) +static struct io_plan *start_waker(struct io_conn *conn, struct data *d) { ok1(d->state == 1); d->state++; - io_wake(idler, do_read, d); + io_wake(idler, plan_read, d); return io_close(conn, NULL); } @@ -38,7 +38,7 @@ static void finish_waker(struct io_conn *conn, struct data *d) d->state++; } -static struct io_op *start_idle(struct io_conn *conn, struct data *d) +static struct io_plan *start_idle(struct io_conn *conn, struct data *d) { int fd; @@ -58,7 +58,7 @@ static void finish_idle(struct io_conn *conn, struct data *d) { ok1(d->state == 4); d->state++; - io_break(d, NULL); + io_break(conn, d, NULL, NULL); } static int make_listen_fd(const char *port, struct addrinfo **info)