X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fio%2Ftest%2Frun-08-hangup-on-idle.c;h=b3840433410b7bfda4068293728c8050b2483856;hp=7463dd98c83e592525fc09b0a30ea250681fef20;hb=5a510ed5696255910fd42adb47d7c1ffa728a116;hpb=0f16a4197c94bfa84dad56d0cb9a9c20438d0a45 diff --git a/ccan/io/test/run-08-hangup-on-idle.c b/ccan/io/test/run-08-hangup-on-idle.c index 7463dd98..b3840433 100644 --- a/ccan/io/test/run-08-hangup-on-idle.c +++ b/ccan/io/test/run-08-hangup-on-idle.c @@ -12,7 +12,7 @@ static struct io_plan timeout_wakeup(struct io_conn *conn, char *buf) { /* This kills the dummy connection. */ close(fds2[1]); - return io_read(buf, 16, io_close, NULL); + return io_read(buf, 16, io_close_cb, NULL); } int main(void) @@ -26,12 +26,13 @@ int main(void) ok1(pipe(fds) == 0); /* Write then close. */ - io_new_conn(fds[1], io_write("hello there world", 16, io_close, NULL)); + io_new_conn(fds[1], io_write("hello there world", 16, + io_close_cb, NULL)); conn = io_new_conn(fds[0], io_idle()); /* To avoid assert(num_waiting) */ ok1(pipe(fds2) == 0); - io_new_conn(fds2[0], io_read(buf, 16, io_close, NULL)); + io_new_conn(fds2[0], io_read(buf, 16, io_close_cb, NULL)); /* After half a second, it will read. */ io_timeout(conn, time_from_msec(500), timeout_wakeup, buf);