aboutsummaryrefslogtreecommitdiff
path: root/lib/easy.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/easy.c')
-rw-r--r--lib/easy.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/lib/easy.c b/lib/easy.c
index 6e8ff770a..100d003f3 100644
--- a/lib/easy.c
+++ b/lib/easy.c
@@ -70,6 +70,7 @@
#include "curl_rand.h"
#include "non-ascii.h"
#include "warnless.h"
+#include "conncache.h"
#define _MPRINTF_REPLACE /* use our functions only */
#include <curl/mprintf.h>
@@ -526,10 +527,10 @@ CURLcode curl_easy_perform(CURL *curl)
}
- if(!data->state.connc) {
- /* oops, no connection cache, make one up */
- data->state.connc = Curl_mk_connc(CONNCACHE_PRIVATE, -1L);
- if(!data->state.connc)
+ if(!data->state.conn_cache) {
+ /* Oops, no connection cache, create one */
+ data->state.conn_cache = Curl_conncache_init(CONNCACHE_PRIVATE);
+ if(!data->state.conn_cache)
return CURLE_OUT_OF_MEMORY;
}
@@ -616,9 +617,9 @@ CURL *curl_easy_duphandle(CURL *incurl)
goto fail;
/* the connection cache is setup on demand */
- outcurl->state.connc = NULL;
+ outcurl->state.conn_cache = NULL;
- outcurl->state.lastconnect = -1;
+ outcurl->state.lastconnect = NULL;
outcurl->progress.flags = data->progress.flags;
outcurl->progress.callback = data->progress.callback;
@@ -674,11 +675,6 @@ CURL *curl_easy_duphandle(CURL *incurl)
fail:
if(outcurl) {
- if(outcurl->state.connc &&
- (outcurl->state.connc->type == CONNCACHE_PRIVATE)) {
- Curl_rm_connc(outcurl->state.connc);
- outcurl->state.connc = NULL;
- }
curl_slist_free_all(outcurl->change.cookielist);
outcurl->change.cookielist = NULL;
Curl_safefree(outcurl->state.headerbuff);