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/connection.c b/src/connection.c
index f286445..e4d26dd 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -91,7 +91,7 @@
return 0;
fail:
/* let the upper layer know the connection failed */
- cs->data_cb->wake(cs);
+ cs->app_ops->wake(cs);
return -1;
} else
return conn_complete_session(conn);