56 (*cb_ptr)->num_connections = 0;
92 if(curr->
ptr == conn) {
151 hashkey(conn, key,
sizeof(key));
180 if(he->
ptr == bundle) {
208 hashkey(conn, key,
sizeof(key));
266 int (*func)(
struct connectdata *conn,
void *param))
291 if(1 == func(conn, param))
336 fprintf(stderr,
"=Bundle cache=\n");
CURLcode Curl_conncache_add_conn(struct conncache *connc, struct connectdata *conn)
int Curl_hash_init(struct curl_hash *h, int slots, hash_function hfunc, comp_function comparator, curl_hash_dtor dtor)
void(* curl_llist_dtor)(void *, void *)
static int bundle_remove_conn(struct connectbundle *cb_ptr, struct connectdata *conn)
void Curl_conncache_foreach(struct conncache *connc, void *param, int(*func)(struct connectdata *conn, void *param))
#define CURL_FORMAT_CURL_OFF_TU
int Curl_hash_delete(struct curl_hash *h, void *key, size_t key_len)
struct curl_llist_element * tail
static CURLcode bundle_create(struct Curl_easy *data, struct connectbundle **cb_ptr)
void Curl_llist_init(struct curl_llist *l, curl_llist_dtor dtor)
static void bundle_destroy(struct connectbundle *cb_ptr)
void Curl_hash_destroy(struct curl_hash *h)
static bool conncache_add_bundle(struct conncache *connc, char *key, struct connectbundle *bundle)
UNITTEST_START int result
void Curl_conncache_remove_conn(struct conncache *connc, struct connectdata *conn)
struct proxy_info http_proxy
void Curl_hash_start_iterate(struct curl_hash *hash, struct curl_hash_iterator *iter)
struct connectbundle * Curl_conncache_find_bundle(struct connectdata *conn, struct conncache *connc)
struct curl_llist_element bundle_node
static CURLcode bundle_add_conn(struct connectbundle *cb_ptr, struct connectdata *conn)
size_t Curl_str_key_compare(void *k1, size_t key1_len, void *k2, size_t key2_len)
static void conn_llist_dtor(void *user, void *element)
void Curl_conncache_print(struct conncache *connc)
CURL_TYPEOF_CURL_OFF_T curl_off_t
static void hashkey(struct connectdata *conn, char *buf, size_t len)
struct proxy_info socks_proxy
struct curl_llist_element * head
static void conncache_remove_bundle(struct conncache *connc, struct connectbundle *bundle)
void Curl_llist_remove(struct curl_llist *list, struct curl_llist_element *e, void *user)
struct hostname conn_to_host
void Curl_llist_destroy(struct curl_llist *list, void *user)
struct connectbundle * bundle
size_t Curl_hash_str(void *key, size_t key_length, size_t slots_num)
static void free_bundle_hash_entry(void *freethis)
void * Curl_hash_add(struct curl_hash *h, void *key, size_t key_len, void *p)
void Curl_llist_insert_next(struct curl_llist *list, struct curl_llist_element *e, const void *p, struct curl_llist_element *ne)
struct curl_hash_element * Curl_hash_next_element(struct curl_hash_iterator *iter)
int Curl_conncache_init(struct conncache *connc, int size)
void Curl_conncache_destroy(struct conncache *connc)
struct curl_llist conn_list
struct conncache * conn_cache
struct connectdata * Curl_conncache_find_first_connection(struct conncache *connc)
void * Curl_hash_pick(struct curl_hash *h, void *key, size_t key_len)
struct curl_llist_element * next