Lines Matching refs:ctx

124   struct cf_test_ctx *ctx = cf->ctx;  in cf_test_destroy()  local
127 (int)Curl_timediff(Curl_now(), current_tr->started), ctx->id); in cf_test_destroy()
131 free(ctx); in cf_test_destroy()
132 cf->ctx = NULL; in cf_test_destroy()
139 struct cf_test_ctx *ctx = cf->ctx; in cf_test_connect() local
145 duration_ms = Curl_timediff(Curl_now(), ctx->started); in cf_test_connect()
146 if(duration_ms >= ctx->fail_delay_ms) { in cf_test_connect()
148 (int)duration_ms, ctx->id); in cf_test_connect()
152 infof(data, "%04dms: cf[%s] continuing", (int)duration_ms, ctx->id); in cf_test_connect()
155 Curl_expire(data, ctx->fail_delay_ms - duration_ms, EXPIRE_RUN_NOW); in cf_test_connect()
193 struct cf_test_ctx *ctx = NULL; in cf_test_create() local
200 ctx = calloc(1, sizeof(*ctx)); in cf_test_create()
201 if(!ctx) { in cf_test_create()
205 ctx->ai_family = ai->ai_family; in cf_test_create()
206 ctx->transport = transport; in cf_test_create()
207 ctx->started = Curl_now(); in cf_test_create()
209 if(ctx->ai_family == AF_INET6) { in cf_test_create()
210 ctx->stats = &current_tr->cf6; in cf_test_create()
211 ctx->fail_delay_ms = current_tc->cf6_fail_delay_ms; in cf_test_create()
212 curl_msprintf(ctx->id, "v6-%d", ctx->stats->creations); in cf_test_create()
213 ctx->stats->creations++; in cf_test_create()
218 ctx->stats = &current_tr->cf4; in cf_test_create()
219 ctx->fail_delay_ms = current_tc->cf4_fail_delay_ms; in cf_test_create()
220 curl_msprintf(ctx->id, "v4-%d", ctx->stats->creations); in cf_test_create()
221 ctx->stats->creations++; in cf_test_create()
224 created_at = Curl_timediff(ctx->started, current_tr->started); in cf_test_create()
225 if(ctx->stats->creations == 1) in cf_test_create()
226 ctx->stats->first_created = created_at; in cf_test_create()
227 ctx->stats->last_created = created_at; in cf_test_create()
228 infof(data, "%04dms: cf[%s] created", (int)created_at, ctx->id); in cf_test_create()
230 result = Curl_cf_create(&cf, &cft_test, ctx); in cf_test_create()
234 Curl_expire(data, ctx->fail_delay_ms, EXPIRE_RUN_NOW); in cf_test_create()
240 free(ctx); in cf_test_create()