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
This commit is contained in:
parent
d409f094a5
commit
fd9d3a1ef1
@ -3069,9 +3069,11 @@ ConnectionExists(struct SessionHandle *data,
|
|||||||
struct connectdata *check;
|
struct connectdata *check;
|
||||||
struct connectdata *chosen = 0;
|
struct connectdata *chosen = 0;
|
||||||
bool canPipeline = IsPipeliningPossible(data, needle);
|
bool canPipeline = IsPipeliningPossible(data, needle);
|
||||||
|
#ifdef USE_NTLM
|
||||||
bool wantNTLMhttp = ((data->state.authhost.want & CURLAUTH_NTLM) ||
|
bool wantNTLMhttp = ((data->state.authhost.want & CURLAUTH_NTLM) ||
|
||||||
(data->state.authhost.want & CURLAUTH_NTLM_WB)) &&
|
(data->state.authhost.want & CURLAUTH_NTLM_WB)) &&
|
||||||
(needle->handler->protocol & PROTO_FAMILY_HTTP) ? TRUE : FALSE;
|
(needle->handler->protocol & PROTO_FAMILY_HTTP) ? TRUE : FALSE;
|
||||||
|
#endif
|
||||||
struct connectbundle *bundle;
|
struct connectbundle *bundle;
|
||||||
|
|
||||||
*force_reuse = FALSE;
|
*force_reuse = FALSE;
|
||||||
@ -3208,6 +3210,7 @@ ConnectionExists(struct SessionHandle *data,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(USE_NTLM)
|
||||||
if((!(needle->handler->flags & PROTOPT_CREDSPERREQUEST)) ||
|
if((!(needle->handler->flags & PROTOPT_CREDSPERREQUEST)) ||
|
||||||
(wantNTLMhttp || check->ntlm.state != NTLMSTATE_NONE)) {
|
(wantNTLMhttp || check->ntlm.state != NTLMSTATE_NONE)) {
|
||||||
/* This protocol requires credentials per connection or is HTTP+NTLM,
|
/* This protocol requires credentials per connection or is HTTP+NTLM,
|
||||||
@ -3217,10 +3220,9 @@ ConnectionExists(struct SessionHandle *data,
|
|||||||
/* one of them was different */
|
/* one of them was different */
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
#if defined(USE_NTLM)
|
|
||||||
credentialsMatch = TRUE;
|
credentialsMatch = TRUE;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if(!needle->bits.httpproxy || needle->handler->flags&PROTOPT_SSL ||
|
if(!needle->bits.httpproxy || needle->handler->flags&PROTOPT_SSL ||
|
||||||
(needle->bits.httpproxy && check->bits.httpproxy &&
|
(needle->bits.httpproxy && check->bits.httpproxy &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user