Lines Matching refs:cb_ptr
49 struct connectbundle **cb_ptr) in bundle_create() argument
52 DEBUGASSERT(*cb_ptr == NULL); in bundle_create()
53 *cb_ptr = malloc(sizeof(struct connectbundle)); in bundle_create()
54 if(!*cb_ptr) in bundle_create()
57 (*cb_ptr)->num_connections = 0; in bundle_create()
58 (*cb_ptr)->multiuse = BUNDLE_UNKNOWN; in bundle_create()
60 (*cb_ptr)->conn_list = Curl_llist_alloc((curl_llist_dtor) conn_llist_dtor); in bundle_create()
61 if(!(*cb_ptr)->conn_list) { in bundle_create()
62 Curl_safefree(*cb_ptr); in bundle_create()
68 static void bundle_destroy(struct connectbundle *cb_ptr) in bundle_destroy() argument
70 if(!cb_ptr) in bundle_destroy()
73 if(cb_ptr->conn_list) { in bundle_destroy()
74 Curl_llist_destroy(cb_ptr->conn_list, NULL); in bundle_destroy()
75 cb_ptr->conn_list = NULL; in bundle_destroy()
77 free(cb_ptr); in bundle_destroy()
81 static CURLcode bundle_add_conn(struct connectbundle *cb_ptr, in bundle_add_conn() argument
84 if(!Curl_llist_insert_next(cb_ptr->conn_list, cb_ptr->conn_list->tail, conn)) in bundle_add_conn()
87 conn->bundle = cb_ptr; in bundle_add_conn()
89 cb_ptr->num_connections++; in bundle_add_conn()
94 static int bundle_remove_conn(struct connectbundle *cb_ptr, in bundle_remove_conn() argument
99 curr = cb_ptr->conn_list->head; in bundle_remove_conn()
102 Curl_llist_remove(cb_ptr->conn_list, curr, NULL); in bundle_remove_conn()
103 cb_ptr->num_connections--; in bundle_remove_conn()