]> git.ozlabs.org Git - ccan/blobdiff - ccan/io/test/run-19-always.c
ccan/io: implement debug.
[ccan] / ccan / io / test / run-19-always.c
index 63eb34e61fb4ec443be0c88977acaea55402f52e..7a015f28b21690ee55121a2dd3f76bbf25fca8f7 100644 (file)
@@ -6,7 +6,9 @@
 #include <sys/wait.h>
 #include <stdio.h>
 
-#ifndef PORT
+#ifdef DEBUG_CONN
+#define PORT "64019"
+#else
 #define PORT "65019"
 #endif
 
@@ -30,6 +32,9 @@ static struct io_plan *write_buf(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++;
        io_set_finish(conn, finish_ok, d);