Lines Matching refs:bundle

107   struct cpool_bundle *bundle;  in cpool_bundle_create()  local
108 bundle = calloc(1, sizeof(*bundle) + dest_len); in cpool_bundle_create()
109 if(!bundle) in cpool_bundle_create()
111 Curl_llist_init(&bundle->conns, NULL); in cpool_bundle_create()
112 bundle->dest_len = dest_len; in cpool_bundle_create()
113 memcpy(bundle->dest, dest, dest_len); in cpool_bundle_create()
114 return bundle; in cpool_bundle_create()
117 static void cpool_bundle_destroy(struct cpool_bundle *bundle) in cpool_bundle_destroy() argument
119 DEBUGASSERT(!Curl_llist_count(&bundle->conns)); in cpool_bundle_destroy()
120 free(bundle); in cpool_bundle_destroy()
124 static void cpool_bundle_add(struct cpool_bundle *bundle, in cpool_bundle_add() argument
128 Curl_llist_append(&bundle->conns, conn, &conn->cpool_node); in cpool_bundle_add()
133 static void cpool_bundle_remove(struct cpool_bundle *bundle, in cpool_bundle_remove() argument
136 (void)bundle; in cpool_bundle_remove()
137 DEBUGASSERT(Curl_node_llist(&conn->cpool_node) == &bundle->conns); in cpool_bundle_remove()
255 struct cpool_bundle *bundle; in cpool_add_bundle() local
257 bundle = cpool_bundle_create(conn->destination, conn->destination_len); in cpool_add_bundle()
258 if(!bundle) in cpool_add_bundle()
262 bundle->dest, bundle->dest_len, bundle)) { in cpool_add_bundle()
263 cpool_bundle_destroy(bundle); in cpool_add_bundle()
266 return bundle; in cpool_add_bundle()
270 struct cpool_bundle *bundle) in cpool_remove_bundle() argument
282 if(he->ptr == bundle) { in cpool_remove_bundle()
294 cpool_bundle_get_oldest_idle(struct cpool_bundle *bundle);
300 struct cpool_bundle *bundle; in Curl_cpool_check_limits() local
318 bundle = cpool_find_bundle(cpool, conn); in Curl_cpool_check_limits()
319 while(bundle && (Curl_llist_count(&bundle->conns) >= dest_limit)) { in Curl_cpool_check_limits()
323 oldest_idle = cpool_bundle_get_oldest_idle(bundle); in Curl_cpool_check_limits()
330 Curl_llist_count(&bundle->conns), dest_limit)); in Curl_cpool_check_limits()
333 if(bundle && (Curl_llist_count(&bundle->conns) >= dest_limit)) { in Curl_cpool_check_limits()
366 struct cpool_bundle *bundle = NULL; in Curl_cpool_add_conn() local
375 bundle = cpool_find_bundle(cpool, conn); in Curl_cpool_add_conn()
376 if(!bundle) { in Curl_cpool_add_conn()
377 bundle = cpool_add_bundle(cpool, conn); in Curl_cpool_add_conn()
378 if(!bundle) { in Curl_cpool_add_conn()
384 cpool_bundle_add(bundle, conn); in Curl_cpool_add_conn()
403 struct cpool_bundle *bundle = cpool_find_bundle(cpool, conn); in cpool_remove_conn() local
404 if(bundle && (list == &bundle->conns)) { in cpool_remove_conn()
405 cpool_bundle_remove(bundle, conn); in cpool_remove_conn()
406 if(!Curl_llist_count(&bundle->conns)) in cpool_remove_conn()
407 cpool_remove_bundle(cpool, bundle); in cpool_remove_conn()
447 struct cpool_bundle *bundle = he->ptr; in cpool_foreach() local
450 curr = Curl_llist_head(&bundle->conns); in cpool_foreach()
470 struct cpool_bundle *bundle; in cpool_get_live_conn() local
476 bundle = he->ptr; in cpool_get_live_conn()
477 conn_node = Curl_llist_head(&bundle->conns); in cpool_get_live_conn()
526 cpool_bundle_get_oldest_idle(struct cpool_bundle *bundle) in cpool_bundle_get_oldest_idle() argument
536 curr = Curl_llist_head(&bundle->conns); in cpool_bundle_get_oldest_idle()
560 struct cpool_bundle *bundle; in cpool_get_oldest_idle() local
571 bundle = he->ptr; in cpool_get_oldest_idle()
573 for(curr = Curl_llist_head(&bundle->conns); curr; in cpool_get_oldest_idle()
596 struct cpool_bundle *bundle; in Curl_cpool_find() local
605 bundle = Curl_hash_pick(&cpool->dest2bundle, (void *)destination, dest_len); in Curl_cpool_find()
606 if(bundle) { in Curl_cpool_find()
607 struct Curl_llist_node *curr = Curl_llist_head(&bundle->conns); in Curl_cpool_find()
1364 struct cpool_bundle *bundle;
1367 bundle = he->ptr;
1370 curr = Curl_llist_head(bundle->conns);