]> git.ozlabs.org Git - ccan/blobdiff - ccan/io/test/run-04-writepartial.c
ccan/io: implement debug.
[ccan] / ccan / io / test / run-04-writepartial.c
index 011bbc894553b58699559655f6c37eeb7b6c2d1f..d3f7043f7b2764ba7bc931defdbaf7709eaa83f7 100644 (file)
@@ -6,7 +6,9 @@
 #include <sys/wait.h>
 #include <stdio.h>
 
-#ifndef PORT
+#ifdef DEBUG_CONN
+#define PORT "64004"
+#else
 #define PORT "65004"
 #endif
 
@@ -25,6 +27,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++;
        io_set_finish(conn, finish_ok, d);