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/src/session.c b/src/session.c
index 975176c..b697599 100644
--- a/src/session.c
+++ b/src/session.c
@@ -462,7 +462,7 @@
}
/* we want the connection handler to notify the stream interface about updates. */
- s->si[0].conn.flags |= CO_FL_NOTIFY_SI;
+ s->si[0].conn.flags |= CO_FL_WAKE_DATA;
/* it is important not to call the wakeup function directly but to
* pass through task_wakeup(), because this one knows how to apply