]> git.ozlabs.org Git - ccan/blobdiff - ccan/io/test/run-09-connect.c
ccan/io: implement debug.
[ccan] / ccan / io / test / run-09-connect.c
index 09b33387590f78808e6a3ef67de08ffc184a7367..124b6a1f70e715f08a3014a8cee72372611ce575 100644 (file)
@@ -6,7 +6,9 @@
 #include <sys/wait.h>
 #include <stdio.h>
 
-#ifndef PORT
+#ifdef DEBUG_CONN
+#define PORT "64009"
+#else
 #define PORT "65009"
 #endif
 
@@ -33,6 +35,9 @@ static struct io_plan *connected(struct io_conn *conn, struct data *d2)
 
 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_close_listener(l);