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/applet.c b/src/applet.c
index 37e642f..5253739 100644
--- a/src/applet.c
+++ b/src/applet.c
@@ -252,7 +252,7 @@
stream_dump_and_crash(&app->obj_type, read_freq_ctr(&app->call_rate));
}
- cs->data_cb->wake(cs);
+ cs->app_ops->wake(cs);
channel_release_buffer(cs_ic(cs), &app->buffer_wait);
return t;
}