X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Fio%2Ftest%2Frun-06-idle.c;h=57d5e20c13ec33223300f409f35953044641abd2;hb=61f58ff94e35c9b8ac5488554e2554bc5c9888b3;hp=e71f4d8b509a49c3c92b2b2f154a98c229546aa4;hpb=cdffdf5d61f8330cfc3467e73a84876eb3928e9b;p=ccan diff --git a/ccan/io/test/run-06-idle.c b/ccan/io/test/run-06-idle.c index e71f4d8b..57d5e20c 100644 --- a/ccan/io/test/run-06-idle.c +++ b/ccan/io/test/run-06-idle.c @@ -9,7 +9,9 @@ #include #include -#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);