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.
This commit is contained in:
Olivier Houchard 2019-03-21 16:30:07 +01:00 committed by Olivier Houchard
parent 7b5fd1ec26
commit df35784600

View File

@ -5524,6 +5524,16 @@ int ssl_sock_handshake(struct connection *conn, unsigned int flag)
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 @@ INITCALL1(STG_REGISTER, sample_register_convs, &conv_kws);
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,