ccan/io: have io_plan mappable back to io_conn.
authorRusty Russell <rusty@rustcorp.com.au>
Thu, 28 Feb 2019 05:24:09 +0000 (15:54 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Thu, 28 Feb 2019 05:24:09 +0000 (15:54 +1030)
commit1966714494a5de39b2ee944fcc01f333c1741dbd
tree5f55388779361a86bf08f7a531bef50b8ddf7dc6
parent9f06b8f85927202c05751e43f285cbef8054052b
ccan/io: have io_plan mappable back to io_conn.

io_conn contains two plans: by knowing what plan this is, it can be cast
back into the io_conn.  That helps for the next patch.

We also remove the strange logic where io_duplex() would return a
magic, invalid io_plan pointer.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ccan/io/backend.h
ccan/io/io.c