mirror of
https://github.com/curl/curl.git
synced 2026-08-26 08:33:31 +03:00
parent
0eed8b7330
commit
2253bc330f
64 changed files with 1218 additions and 1416 deletions
|
|
@ -171,13 +171,11 @@ static void ntlm_conn_dtor(void *key, size_t klen, void *entry)
|
|||
|
||||
struct ntlmdata *Curl_auth_ntlm_get(struct connectdata *conn, bool proxy)
|
||||
{
|
||||
const char *key = proxy ? CURL_META_NTLM_PROXY_CONN :
|
||||
CURL_META_NTLM_CONN;
|
||||
const char *key = proxy ? CURL_META_NTLM_PROXY_CONN : CURL_META_NTLM_CONN;
|
||||
struct ntlmdata *ntlm = Curl_conn_meta_get(conn, key);
|
||||
if(!ntlm) {
|
||||
ntlm = curlx_calloc(1, sizeof(*ntlm));
|
||||
if(!ntlm ||
|
||||
Curl_conn_meta_set(conn, key, ntlm, ntlm_conn_dtor))
|
||||
if(!ntlm || Curl_conn_meta_set(conn, key, ntlm, ntlm_conn_dtor))
|
||||
return NULL;
|
||||
}
|
||||
return ntlm;
|
||||
|
|
@ -185,8 +183,8 @@ struct ntlmdata *Curl_auth_ntlm_get(struct connectdata *conn, bool proxy)
|
|||
|
||||
void Curl_auth_ntlm_remove(struct connectdata *conn, bool proxy)
|
||||
{
|
||||
Curl_conn_meta_remove(conn, proxy ?
|
||||
CURL_META_NTLM_PROXY_CONN : CURL_META_NTLM_CONN);
|
||||
Curl_conn_meta_remove(conn, proxy ? CURL_META_NTLM_PROXY_CONN
|
||||
: CURL_META_NTLM_CONN);
|
||||
}
|
||||
|
||||
#endif /* USE_NTLM */
|
||||
|
|
@ -257,13 +255,11 @@ static void nego_conn_dtor(void *key, size_t klen, void *entry)
|
|||
|
||||
struct negotiatedata *Curl_auth_nego_get(struct connectdata *conn, bool proxy)
|
||||
{
|
||||
const char *key = proxy ? CURL_META_NEGO_PROXY_CONN :
|
||||
CURL_META_NEGO_CONN;
|
||||
const char *key = proxy ? CURL_META_NEGO_PROXY_CONN : CURL_META_NEGO_CONN;
|
||||
struct negotiatedata *nego = Curl_conn_meta_get(conn, key);
|
||||
if(!nego) {
|
||||
nego = curlx_calloc(1, sizeof(*nego));
|
||||
if(!nego ||
|
||||
Curl_conn_meta_set(conn, key, nego, nego_conn_dtor))
|
||||
if(!nego || Curl_conn_meta_set(conn, key, nego, nego_conn_dtor))
|
||||
return NULL;
|
||||
}
|
||||
return nego;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue