plan.pollflag = 0;
plan.io = NULL;
- /* Never called (overridded by io_wake), but NULL means closing */
- plan.next = io_close;
+ /* Never called (overridden by io_wake), but NULL means closing */
+ plan.next = (void *)io_idle;
io_plan_debug(&plan);
return plan;
switch (conn->plan.io(conn->fd.fd, &conn->plan)) {
case -1: /* Failure means a new plan: close up. */
set_current(conn);
- conn->plan = io_close(NULL, NULL);
+ conn->plan = io_close();
backend_plan_changed(conn);
set_current(NULL);
break;
}
}
-/* Useful next functions. */
/* Close the connection, we're done. */
-struct io_plan io_close(struct io_conn *conn, void *arg)
+struct io_plan io_close(void)
{
struct io_plan plan;
return plan;
}
+struct io_plan io_close_cb(struct io_conn *conn, void *arg)
+{
+ return io_close();
+}
+
/* Exit the loop, returning this (non-NULL) arg. */
struct io_plan io_break_(void *ret, struct io_plan plan)
{