From: Arran Cudbard-Bell Date: Thu, 11 Nov 2021 22:23:09 +0000 (-0600) Subject: Correct fix for rlm_sql_cassandra X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=31a7d4c481a17ebf535752a6a1cd26b1aac56ccf;p=thirdparty%2Ffreeradius-server.git Correct fix for rlm_sql_cassandra --- diff --git a/src/modules/rlm_sql/drivers/rlm_sql_cassandra/rlm_sql_cassandra.c b/src/modules/rlm_sql/drivers/rlm_sql_cassandra/rlm_sql_cassandra.c index 690b73f2a10..4c85da631e5 100644 --- a/src/modules/rlm_sql/drivers/rlm_sql_cassandra/rlm_sql_cassandra.c +++ b/src/modules/rlm_sql/drivers/rlm_sql_cassandra/rlm_sql_cassandra.c @@ -719,12 +719,11 @@ static int mod_detach(module_detach_ctx_t const *mctx) return 0; } -static int mod_instantiate(module_inst_ctx_t const *mctx) +static int mod_instantiate(rlm_sql_config_t const *config, void *instance, CONF_SECTION *cs) { bool do_tls = false; bool do_latency_aware_routing = false; - rlm_sql_cassandra_t *inst = talloc_get_type_abort(mctx->inst->data, rlm_sql_cassandra_t); - CONF_SECTION *conf = mctx->inst->conf; + rlm_sql_cassandra_t *inst = talloc_get_type_abort(instance, rlm_sql_cassandra_t); CassCluster *cluster; @@ -747,8 +746,8 @@ do {\ * This has to be done before we call cf_section_parse * as it sets default values, and creates the section. */ - if (cf_section_find(conf, "tls", NULL)) do_tls = true; - if (cf_section_find(conf, "latency_aware_routing", NULL)) do_latency_aware_routing = true; + if (cf_section_find(cs, "tls", NULL)) do_tls = true; + if (cf_section_find(cs, "latency_aware_routing", NULL)) do_latency_aware_routing = true; DEBUG4("Configuring CassCluster structure"); cluster = inst->cluster = cass_cluster_new();