Lines Matching refs:cb_ptr
50 struct connectbundle **cb_ptr) in bundle_create() argument
53 DEBUGASSERT(*cb_ptr == NULL); in bundle_create()
54 *cb_ptr = malloc(sizeof(struct connectbundle)); in bundle_create()
55 if(!*cb_ptr) in bundle_create()
58 (*cb_ptr)->num_connections = 0; in bundle_create()
59 (*cb_ptr)->multiuse = BUNDLE_UNKNOWN; in bundle_create()
61 (*cb_ptr)->conn_list = Curl_llist_alloc((curl_llist_dtor) conn_llist_dtor); in bundle_create()
62 if(!(*cb_ptr)->conn_list) { in bundle_create()
63 Curl_safefree(*cb_ptr); in bundle_create()
69 static void bundle_destroy(struct connectbundle *cb_ptr) in bundle_destroy() argument
71 if(!cb_ptr) in bundle_destroy()
74 if(cb_ptr->conn_list) { in bundle_destroy()
75 Curl_llist_destroy(cb_ptr->conn_list, NULL); in bundle_destroy()
76 cb_ptr->conn_list = NULL; in bundle_destroy()
78 free(cb_ptr); in bundle_destroy()
82 static CURLcode bundle_add_conn(struct connectbundle *cb_ptr, in bundle_add_conn() argument
85 if(!Curl_llist_insert_next(cb_ptr->conn_list, cb_ptr->conn_list->tail, conn)) in bundle_add_conn()
88 conn->bundle = cb_ptr; in bundle_add_conn()
90 cb_ptr->num_connections++; in bundle_add_conn()
95 static int bundle_remove_conn(struct connectbundle *cb_ptr, in bundle_remove_conn() argument
100 curr = cb_ptr->conn_list->head; in bundle_remove_conn()
103 Curl_llist_remove(cb_ptr->conn_list, curr, NULL); in bundle_remove_conn()
104 cb_ptr->num_connections--; in bundle_remove_conn()