X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Fio%2Ftest%2Frun-07-break.c;h=d13b0f183609bc8cef34d1992eae0f068358c5be;hb=0fbc79090f9ff5bc1caf8c0f0f05525a05f2e82d;hp=1f69e9f51bb17e3e2aae58075adf5d3a6c8d7d34;hpb=cdffdf5d61f8330cfc3467e73a84876eb3928e9b;p=ccan diff --git a/ccan/io/test/run-07-break.c b/ccan/io/test/run-07-break.c index 1f69e9f5..d13b0f18 100644 --- a/ccan/io/test/run-07-break.c +++ b/ccan/io/test/run-07-break.c @@ -6,7 +6,9 @@ #include #include -#ifndef PORT +#ifdef DEBUG_CONN +#define PORT "64007" +#else #define PORT "65007" #endif @@ -30,6 +32,9 @@ static void finish_ok(struct io_conn *conn, struct data *d) static struct io_plan *init_conn(struct io_conn *conn, struct data *d) { +#ifdef DEBUG_CONN + io_set_debug(conn, true); +#endif ok1(d->state == 0); d->state++; @@ -107,11 +112,11 @@ int main(void) exit(0); } freeaddrinfo(addrinfo); - ok1(io_loop() == d); + ok1(io_loop(NULL, NULL) == d); ok1(d->state == 1); io_close_listener(l); - ok1(io_loop() == NULL); + ok1(io_loop(NULL, NULL) == NULL); ok1(d->state == 3); ok1(memcmp(d->buf, "hellothere", sizeof(d->buf)) == 0); free(d);