h2_ctx *h2_ctx_get(conn_rec *c, int create) { h2_ctx *ctx = (h2_ctx*)ap_get_module_config(c->conn_config, &h2_module); if (ctx == NULL && create) { ctx = h2_ctx_create(c); } return ctx; }
h2_ctx *h2_ctx_create_for(conn_rec *c, h2_task_env *env) { h2_ctx *ctx = h2_ctx_create(c); if (ctx) { ctx->task_env = env; } return ctx; }
h2_ctx *h2_ctx_create_for(conn_rec *c, h2_task *task) { h2_ctx *ctx = h2_ctx_create(c); if (ctx) { ctx->task = task; } return ctx; }
h2_ctx *h2_ctx_get(const conn_rec *c) { h2_ctx *ctx = (h2_ctx*)ap_get_module_config(c->conn_config, &http2_module); if (ctx == NULL) { ctx = h2_ctx_create(c); } return ctx; }