X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fio%2Ftest%2Frun-07-break.c;h=19cc6a8e662b393f8f672e3a46d1340d37e2a634;hp=3ea20bf528cf26da7157a5e9eb91ca786804b41e;hb=f7ab2c65d40839a327e50876dc2708ab7b11aa52;hpb=34776d3e9ad7de78778306a2d09c2c95df06c902 diff --git a/ccan/io/test/run-07-break.c b/ccan/io/test/run-07-break.c index 3ea20bf5..19cc6a8e 100644 --- a/ccan/io/test/run-07-break.c +++ b/ccan/io/test/run-07-break.c @@ -19,7 +19,7 @@ static struct io_plan read_done(struct io_conn *conn, struct data *d) { ok1(d->state == 1); d->state++; - return io_close(conn, NULL); + return io_close(); } static void finish_ok(struct io_conn *conn, struct data *d) @@ -33,11 +33,10 @@ static void init_conn(int fd, struct data *d) ok1(d->state == 0); d->state++; - if (!io_new_conn(fd, - io_break(d, - io_read(d->buf, sizeof(d->buf), read_done, d)), - finish_ok, d)) - abort(); + io_set_finish(io_new_conn(fd, + io_break(d, + io_read(d->buf, sizeof(d->buf), read_done, d))), + finish_ok, d); } static int make_listen_fd(const char *port, struct addrinfo **info)