]> git.ozlabs.org Git - ccan/blobdiff - ccan/io/test/run-06-idle.c
tal: make tal_len/tal_count(NULL) return 0.
[ccan] / ccan / io / test / run-06-idle.c
index e71f4d8b509a49c3c92b2b2f154a98c229546aa4..3d7c3cc33201389e0469e29db815335d342c43d6 100644 (file)
@@ -9,9 +9,7 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 
-#ifndef PORT
 #define PORT "65006"
-#endif
 
 static struct io_conn *idler;
 
@@ -71,7 +69,7 @@ static struct io_plan *init_idle(struct io_conn *conn, struct data *d)
        ok1(fd2 >= 0);
        io_set_finish(io_new_conn(NULL, fd2, init_waker, d), finish_waker, d);
 
-       return io_wait(conn, d, IO_IN, read_buf, d);
+       return io_wait(conn, d, read_buf, d);
 }
 
 static int make_listen_fd(const char *port, struct addrinfo **info)
@@ -143,7 +141,7 @@ int main(void)
        }
        freeaddrinfo(addrinfo);
 
-       ok1(io_loop() == d);
+       ok1(io_loop(NULL, NULL) == d);
        ok1(d->state == 4);
        ok1(memcmp(d->buf, "hellothere", sizeof(d->buf)) == 0);
        free(d);