MINOR: connection: provide a generic data layer wakeup callback
Instead of calling conn_notify_si() from the connection handler, we
now call data->wake(), which will allow us to use a different callback
with health checks.
Note that we still rely on a flag in order to decide whether or not
to call this function. The reason is that with embryonic sessions,
the callback is already initialized to si_conn_cb without the flag,
and we can't call the SI notify function in the leave path before
the stream interface is initialized.
This issue should be addressed by involving a different data_cb for
embryonic sessions and for stream interfaces, that would be changed
during session_complete() for the final data_cb.
diff --git a/include/proto/stream_interface.h b/include/proto/stream_interface.h
index 3472b99..bf03f6e 100644
--- a/include/proto/stream_interface.h
+++ b/include/proto/stream_interface.h
@@ -36,11 +36,8 @@
void stream_int_report_error(struct stream_interface *si);
void stream_int_retnclose(struct stream_interface *si, const struct chunk *msg);
int conn_si_send_proxy(struct connection *conn, unsigned int flag);
-void conn_notify_si(struct connection *conn);
int stream_int_shutr(struct stream_interface *si);
int stream_int_shutw(struct stream_interface *si);
-void si_conn_recv_cb(struct connection *conn);
-void si_conn_send_cb(struct connection *conn);
void stream_sock_read0(struct stream_interface *si);
extern struct si_ops si_embedded_ops;
@@ -135,7 +132,7 @@
si->conn.flags |= CO_FL_SI_SEND_PROXY;
/* we need to be notified about connection establishment */
- si->conn.flags |= CO_FL_NOTIFY_SI;
+ si->conn.flags |= CO_FL_WAKE_DATA;
/* we're in the process of establishing a connection */
si->state = SI_ST_CON;