]> git.ozlabs.org Git - ccan/blobdiff - ccan/io/test/run-06-idle.c
Merge Makefile rewrite into master
[ccan] / ccan / io / test / run-06-idle.c
index e71f4d8b509a49c3c92b2b2f154a98c229546aa4..57d5e20c13ec33223300f409f35953044641abd2 100644 (file)
@@ -9,7 +9,9 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 
-#ifndef PORT
+#ifdef DEBUG_CONN
+#define PORT "64006"
+#else
 #define PORT "65006"
 #endif
 
@@ -71,7 +73,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 +145,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);