]> git.ozlabs.org Git - ccan/blobdiff - ccan/io/test/run-02-read.c
ccan/io: pass struct io_plan explicitly.
[ccan] / ccan / io / test / run-02-read.c
index 3f376fe659a73d611b7b4c660b5dc7e49d6e68aa..8b96f029825cdfc6490f3470593d448f2d7922dd 100644 (file)
@@ -11,18 +11,18 @@ struct data {
        char buf[4];
 };
 
-static struct io_plan *start_ok(struct io_conn *conn, struct data *d)
+static struct io_plan start_ok(struct io_conn *conn, struct data *d)
 {
        ok1(d->state == 0);
        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 void finish_ok(struct io_conn *conn, struct data *d)
 {
        ok1(d->state == 1);
        d->state++;
-       io_break(d, NULL);
+       io_break(conn, d, NULL, NULL);
 }
 
 static int make_listen_fd(const char *port, struct addrinfo **info)