CLEANUP: connection: remove all direct references to raw_sock and ssl_sock
Now we exclusively use xprt_get(XPRT_RAW) instead of &raw_sock or
xprt_get(XPRT_SSL) for &ssl_sock. This removes a bunch of #ifdef and
include spread over a number of location including backend, cfgparse,
checks, cli, hlua, log, server and session.
diff --git a/src/log.c b/src/log.c
index 27d53f7..be1ebdc 100644
--- a/src/log.c
+++ b/src/log.c
@@ -1629,10 +1629,8 @@
if (iret == 0)
goto out;
tmplog += iret;
-#ifdef USE_OPENSSL
- if (sess->listener->bind_conf->xprt == &ssl_sock)
+ if (sess->listener->bind_conf->xprt == xprt_get(XPRT_SSL))
LOGCHAR('~');
-#endif
if (tmp->options & LOG_OPT_QUOTE)
LOGCHAR('"');
last_isspace = 0;
@@ -1642,7 +1640,7 @@
src = NULL;
conn = objt_conn(sess->origin);
if (conn) {
- if (sess->listener->bind_conf->xprt == &ssl_sock)
+ if (sess->listener->bind_conf->xprt == xprt_get(XPRT_SSL))
src = ssl_sock_get_cipher_name(conn);
}
ret = lf_text(tmplog, src, dst + maxsize - tmplog, tmp);
@@ -1656,7 +1654,7 @@
src = NULL;
conn = objt_conn(sess->origin);
if (conn) {
- if (sess->listener->bind_conf->xprt == &ssl_sock)
+ if (sess->listener->bind_conf->xprt == xprt_get(XPRT_SSL))
src = ssl_sock_get_proto_version(conn);
}
ret = lf_text(tmplog, src, dst + maxsize - tmplog, tmp);