static int on_config_http1_upgrade_to_http2(h2o_configurator_t *configurator, h2o_context_t *ctx, const char *config_file, yoml_t *config_node) { ssize_t ret = h2o_config_get_one_of(configurator, config_file, config_node, "OFF,ON"); if (ret == -1) return -1; ctx->http1_upgrade_to_http2 = (int)ret; return 0; }
static int on_config_http1_upgrade_to_http2(h2o_configurator_t *configurator, void *_config, const char *file, yoml_t *node) { h2o_global_configuration_t *config = _config; ssize_t ret = h2o_config_get_one_of(configurator, file, node, "OFF,ON"); if (ret == -1) return -1; config->http1_upgrade_to_http2 = (int)ret; return 0; }