summaryrefslogtreecommitdiff
path: root/lib/conncache.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-05-27 11:51:34 +0200
committerDaniel Stenberg <daniel@haxx.se>2020-05-30 23:18:16 +0200
commitf3d501dc678d80a93325bd93ab05c48855e1c0d1 (patch)
treef1f63712798510398d6e7aebc30f24afb27ed15c /lib/conncache.c
parentc4e6968127e876b01e5e0b4b7cdbc49d5267530c (diff)
downloadcurl-f3d501dc678d80a93325bd93ab05c48855e1c0d1.tar.gz
build: disable more code/data when built without proxy support
Added build to travis to verify Closes #5466
Diffstat (limited to 'lib/conncache.c')
-rw-r--r--lib/conncache.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/conncache.c b/lib/conncache.c
index 4474c28b4..f98e22978 100644
--- a/lib/conncache.c
+++ b/lib/conncache.c
@@ -143,12 +143,15 @@ static void hashkey(struct connectdata *conn, char *buf,
const char *hostname;
long port = conn->remote_port;
+#ifndef CURL_DISABLE_PROXY
if(conn->bits.httpproxy && !conn->bits.tunnel_proxy) {
hostname = conn->http_proxy.host.name;
port = conn->port;
}
- else if(conn->bits.conn_to_host)
- hostname = conn->conn_to_host.name;
+ else
+#endif
+ if(conn->bits.conn_to_host)
+ hostname = conn->conn_to_host.name;
else
hostname = conn->host.name;