]> git.ipfire.org Git - thirdparty/knot-dns.git/commitdiff
redis: fix compilation if hiredis without TLS
authorDaniel Salzman <daniel.salzman@nic.cz>
Thu, 16 Oct 2025 06:12:42 +0000 (08:12 +0200)
committerDaniel Salzman <daniel.salzman@nic.cz>
Thu, 16 Oct 2025 06:12:42 +0000 (08:12 +0200)
src/knot/common/hiredis.c

index 85e651fd2cebc9b70059269ba13a514546cd65a8..c64a0157a38e5c123aadd4ad6f0bbbdf029b1d3a 100644 (file)
@@ -369,8 +369,11 @@ redisContext *rdb_connect(conf_t *conf, bool require_master)
 connected:
        if (log_enabled_debug()) {
                bool tcp = rdb->connection_type == REDIS_CONN_TCP;
-               bool tls = rdb->privctx != NULL;
                bool pool = addr_str[0] == '\0';
+               bool tls = false;
+#ifdef ENABLE_REDIS_TLS
+               tls = rdb->privctx != NULL;
+#endif // ENABLE_REDIS_TLS
                log_debug("rdb, connected, remote %s%s%.0u%s%s%s",
                          (tcp ? rdb->tcp.host : rdb->unix_sock.path),
                          (tcp ? "@" : ""),