MCPcopy Create free account
hub / github.com/ElementsProject/lightning / next_plan

Function next_plan

ccan/ccan/io/io.c:49–70  ·  view source on GitHub ↗

Returns false if conn was freed. */

Source from the content-addressed store, hash-verified

47
48/* Returns false if conn was freed. */
49static bool next_plan(struct io_conn *conn, struct io_plan *plan)
50{
51 struct io_plan *(*next)(struct io_conn *, void *arg);
52
53 next = plan->next;
54
55 plan->status = IO_UNSET;
56 plan->io = NULL;
57 plan->next = io_never_called;
58
59 plan = next(conn, plan->next_arg);
60
61 if (plan == &io_conn_freed)
62 return false;
63
64 assert(plan == &conn->plan[plan->dir]);
65 assert(conn->plan[IO_IN].status != IO_UNSET
66 || conn->plan[IO_OUT].status != IO_UNSET);
67
68 backend_new_plan(conn);
69 return true;
70}
71
72bool io_fd_block(int fd, bool block)
73{

Callers 3

io_new_conn_Function · 0.85
do_planFunction · 0.85
io_do_alwaysFunction · 0.85

Calls 2

nextFunction · 0.85
backend_new_planFunction · 0.85

Tested by

no test coverage detected