MEDIUM: ssl: provide its own subscribe/unsubscribe function.
In order to prepare for the possibility of using different kinds of xprt
with ssl, make the ssl code provide its own subscribe and unsubscribe
functions, right now it just calls conn_subscribe and conn_unsubsribe.
diff --git a/src/ssl_sock.c b/src/ssl_sock.c
index ea96470..b4aa94a 100644
--- a/src/ssl_sock.c
+++ b/src/ssl_sock.c
@@ -5524,6 +5524,16 @@
return 0;
}
+static int ssl_subscribe(struct connection *conn, int event_type, void *param)
+{
+ return conn_subscribe(conn, event_type, param);
+}
+
+static int ssl_unsubscribe(struct connection *conn, int event_type, void *param)
+{
+ return conn_unsubscribe(conn, event_type, param);
+}
+
/* Receive up to <count> bytes from connection <conn>'s socket and store them
* into buffer <buf>. Only one call to recv() is performed, unless the
* buffer wraps, in which case a second call may be performed. The connection's
@@ -9619,8 +9629,8 @@
static struct xprt_ops ssl_sock = {
.snd_buf = ssl_sock_from_buf,
.rcv_buf = ssl_sock_to_buf,
- .subscribe = conn_subscribe,
- .unsubscribe = conn_unsubscribe,
+ .subscribe = ssl_subscribe,
+ .unsubscribe = ssl_unsubscribe,
.rcv_pipe = NULL,
.snd_pipe = NULL,
.shutr = NULL,