MINOR: ssl: set the listeners' data layer to ssl during parsing
It's better to set all listeners to ssl_sock when seeing the "ssl"
keyword that to loop on all of them afterwards just for this. This
also removes some #ifdefs.
diff --git a/src/ssl_sock.c b/src/ssl_sock.c
index 3c997eb..4862a9a 100644
--- a/src/ssl_sock.c
+++ b/src/ssl_sock.c
@@ -863,7 +863,12 @@
/* parse the "ssl" bind keyword */
static int bind_parse_ssl(char **args, int cur_arg, struct proxy *px, struct bind_conf *conf, char **err)
{
+ struct listener *l;
+
conf->is_ssl = 1;
+ list_for_each_entry(l, &conf->listeners, by_bind)
+ l->data = &ssl_sock;
+
return 0;
}