X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;ds=sidebyside;f=ccan%2Fio%2Ftest%2Frun-17-homemade-io.c;h=325a7468eb4ac4b08b1ac7fc2b7abc1a565942f0;hb=318f717e34e4735e5397bee24dbbee69205be82b;hp=1087e2509871347ad0c809abad92d40b6e7b4c11;hpb=94dd4c2bddd0dc080ad5b85465fa3f45f486967a;p=ccan diff --git a/ccan/io/test/run-17-homemade-io.c b/ccan/io/test/run-17-homemade-io.c index 1087e250..325a7468 100644 --- a/ccan/io/test/run-17-homemade-io.c +++ b/ccan/io/test/run-17-homemade-io.c @@ -6,7 +6,9 @@ #include #include -#ifndef PORT +#ifdef DEBUG_CONN +#define PORT "64017" +#else #define PORT "65017" #endif @@ -77,15 +79,15 @@ static struct io_plan *io_read_packet(struct io_conn *conn, pkt->contents = NULL; plan->u1.vp = pkt; plan->u2.s = 0; - plan->io = do_read_packet; - plan->next = cb; - plan->next_arg = arg; - return plan; + return io_set_plan(conn, plan, do_read_packet, cb, arg); } static struct io_plan *init_conn(struct io_conn *conn, struct packet *pkt) { +#ifdef DEBUG_CONN + io_set_debug(conn, true); +#endif ok1(pkt->state == 0); pkt->state++;