From: Olivier Houchard Date: Thu, 21 Mar 2019 15:30:07 +0000 (+0100) Subject: MEDIUM: ssl: provide its own subscribe/unsubscribe function. X-Git-Tag: v2.0-dev3~223 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=df357846001a65f88af8357a50e188c96a20df7d;p=thirdparty%2Fhaproxy.git 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 ea96470cb0..b4aa94ab9a 100644 --- a/src/ssl_sock.c +++ b/src/ssl_sock.c @@ -5524,6 +5524,16 @@ reneg_ok: 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 bytes from connection 's socket and store them * into buffer . 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,