| 1607 | } |
| 1608 | |
| 1609 | static struct io_plan *subd_conn_init(struct io_conn *subd_conn, |
| 1610 | struct subd *subd) |
| 1611 | { |
| 1612 | subd->conn = subd_conn; |
| 1613 | |
| 1614 | /* subd is a child of the conn: free when it closes! */ |
| 1615 | tal_steal(subd->conn, subd); |
| 1616 | tal_add_destructor(subd, destroy_connected_subd); |
| 1617 | return io_duplex(subd_conn, |
| 1618 | read_from_subd(subd_conn, subd), |
| 1619 | write_to_subd(subd_conn, subd)); |
| 1620 | } |
| 1621 | |
| 1622 | /* Peer disconnected (we remove this if *we* close). */ |
| 1623 | static void destroy_peer_conn(struct io_conn *peer_conn, struct peer *peer) |
nothing calls this directly
no test coverage detected