Lines Matching refs:b
62 static void cf_hc_baller_reset(struct cf_hc_baller *b, in cf_hc_baller_reset() argument
65 if(b->cf) { in cf_hc_baller_reset()
66 Curl_conn_cf_close(b->cf, data); in cf_hc_baller_reset()
67 Curl_conn_cf_discard_chain(&b->cf, data); in cf_hc_baller_reset()
68 b->cf = NULL; in cf_hc_baller_reset()
70 b->result = CURLE_OK; in cf_hc_baller_reset()
71 b->reply_ms = -1; in cf_hc_baller_reset()
74 static bool cf_hc_baller_is_active(struct cf_hc_baller *b) in cf_hc_baller_is_active() argument
76 return b->enabled && b->cf && !b->result; in cf_hc_baller_is_active()
79 static bool cf_hc_baller_has_started(struct cf_hc_baller *b) in cf_hc_baller_has_started() argument
81 return !!b->cf; in cf_hc_baller_has_started()
84 static int cf_hc_baller_reply_ms(struct cf_hc_baller *b, in cf_hc_baller_reply_ms() argument
87 if(b->reply_ms < 0) in cf_hc_baller_reply_ms()
88 b->cf->cft->query(b->cf, data, CF_QUERY_CONNECT_REPLY_MS, in cf_hc_baller_reply_ms()
89 &b->reply_ms, NULL); in cf_hc_baller_reply_ms()
90 return b->reply_ms; in cf_hc_baller_reply_ms()
93 static bool cf_hc_baller_data_pending(struct cf_hc_baller *b, in cf_hc_baller_data_pending() argument
96 return b->cf && !b->result && b->cf->cft->has_data_pending(b->cf, data); in cf_hc_baller_data_pending()
99 static bool cf_hc_baller_needs_flush(struct cf_hc_baller *b, in cf_hc_baller_needs_flush() argument
102 return b->cf && !b->result && Curl_conn_cf_needs_flush(b->cf, data); in cf_hc_baller_needs_flush()
105 static CURLcode cf_hc_baller_cntrl(struct cf_hc_baller *b, in cf_hc_baller_cntrl() argument
109 if(b->cf && !b->result) in cf_hc_baller_cntrl()
110 return Curl_conn_cf_cntrl(b->cf, data, FALSE, event, arg1, arg2); in cf_hc_baller_cntrl()
125 static void cf_hc_baller_init(struct cf_hc_baller *b, in cf_hc_baller_init() argument
134 b->name = name; in cf_hc_baller_init()
136 b->started = Curl_now(); in cf_hc_baller_init()
137 b->result = Curl_cf_setup_insert_after(cf, data, ctx->remotehost, in cf_hc_baller_init()
139 b->cf = cf->next; in cf_hc_baller_init()
143 static CURLcode cf_hc_baller_connect(struct cf_hc_baller *b, in cf_hc_baller_connect() argument
150 cf->next = b->cf; in cf_hc_baller_connect()
151 b->result = Curl_conn_cf_connect(cf->next, data, FALSE, done); in cf_hc_baller_connect()
152 b->cf = cf->next; /* it might mutate */ in cf_hc_baller_connect()
154 return b->result; in cf_hc_baller_connect()
362 struct cf_hc_baller *b = ballers[i]; in cf_hc_shutdown() local
364 if(!cf_hc_baller_is_active(b) || b->shutdown) in cf_hc_shutdown()
366 b->result = b->cf->cft->do_shutdown(b->cf, data, &bdone); in cf_hc_shutdown()
367 if(b->result || bdone) in cf_hc_shutdown()
368 b->shutdown = TRUE; /* treat a failed shutdown as done */ in cf_hc_shutdown()
398 struct cf_hc_baller *b = ballers[i]; in cf_hc_adjust_pollset() local
399 if(!cf_hc_baller_is_active(b)) in cf_hc_adjust_pollset()
401 Curl_conn_cf_adjust_pollset(b->cf, data, ps); in cf_hc_adjust_pollset()