aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2015-04-22 13:31:35 +0200
committerDaniel Stenberg <daniel@haxx.se>2015-04-22 13:32:45 +0200
commitfd9d3a1ef1f7b1cb5812d04bad07818efc6f3b3a (patch)
treee0782049e228bc80bfa37d9062a6641aab13cc08 /lib
parentd409f094a54fa661f88800095b59e1dd4d1c6f2f (diff)
connectionexists: fix build without NTLM
Do not access NTLM-specific struct fields when built without NTLM enabled! bug: http://curl.haxx.se/?i=231 Reported-by: Patrick Rapin
Diffstat (limited to 'lib')
-rw-r--r--lib/url.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/url.c b/lib/url.c
index f033dbc95..93f15f164 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -3069,9 +3069,11 @@ ConnectionExists(struct SessionHandle *data,
struct connectdata *check;
struct connectdata *chosen = 0;
bool canPipeline = IsPipeliningPossible(data, needle);
+#ifdef USE_NTLM
bool wantNTLMhttp = ((data->state.authhost.want & CURLAUTH_NTLM) ||
(data->state.authhost.want & CURLAUTH_NTLM_WB)) &&
(needle->handler->protocol & PROTO_FAMILY_HTTP) ? TRUE : FALSE;
+#endif
struct connectbundle *bundle;
*force_reuse = FALSE;
@@ -3208,6 +3210,7 @@ ConnectionExists(struct SessionHandle *data,
continue;
}
+#if defined(USE_NTLM)
if((!(needle->handler->flags & PROTOPT_CREDSPERREQUEST)) ||
(wantNTLMhttp || check->ntlm.state != NTLMSTATE_NONE)) {
/* This protocol requires credentials per connection or is HTTP+NTLM,
@@ -3217,10 +3220,9 @@ ConnectionExists(struct SessionHandle *data,
/* one of them was different */
continue;
}
-#if defined(USE_NTLM)
credentialsMatch = TRUE;
-#endif
}
+#endif
if(!needle->bits.httpproxy || needle->handler->flags&PROTOPT_SSL ||
(needle->bits.httpproxy && check->bits.httpproxy &&