MEDIUM: stconn: merge the app_ops and the data_cb fields
For historical reasons (stream-interface and connections), we used to
require two independent fields for the application level callbacks and
the transport-level functions. Over time the distinction faded away so
much that the low-level functions became specific to the application
and conversely. For example, applets may only work with streams on top
since they rely on the channels, and the stream-level functions differ
between applets and connections. Right now the application level only
contains a wake() callback and the low-level ones contain the functions
that act at the lower level to perform the shutr/shutw and at the upper
level to notify about readability and writability. Let's just merge them
together into a single set and get rid of this confusing distinction.
Note that the check ops do not define any app-level function since these
are only called by streams.
diff --git a/src/mux_h2.c b/src/mux_h2.c
index 694d6a7..dde18dc 100644
--- a/src/mux_h2.c
+++ b/src/mux_h2.c
@@ -1334,9 +1334,9 @@
h2s_notify_recv(h2s);
h2s_notify_send(h2s);
}
- else if (h2s_sc(h2s) && h2s_sc(h2s)->data_cb->wake != NULL) {
+ else if (h2s_sc(h2s) && h2s_sc(h2s)->app_ops->wake != NULL) {
TRACE_POINT(H2_EV_STRM_WAKE, h2s->h2c->conn, h2s);
- h2s_sc(h2s)->data_cb->wake(h2s_sc(h2s));
+ h2s_sc(h2s)->app_ops->wake(h2s_sc(h2s));
}
TRACE_LEAVE(H2_EV_H2S_WAKE, h2s->h2c->conn, h2s);