Returns false if conn was freed. */
| 47 | |
| 48 | /* Returns false if conn was freed. */ |
| 49 | static 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 | |
| 72 | bool io_fd_block(int fd, bool block) |
| 73 | { |
no test coverage detected