]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Fix arguments to cassandra
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 11 Nov 2021 22:10:26 +0000 (16:10 -0600)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 11 Nov 2021 22:10:26 +0000 (16:10 -0600)
src/modules/rlm_sql/drivers/rlm_sql_cassandra/rlm_sql_cassandra.c

index e214776d709d2d15bf9c757f9471206e2647eb87..690b73f2a103d0fe7b449f7ba596f313ce440191 100644 (file)
@@ -719,11 +719,12 @@ static int mod_detach(module_detach_ctx_t const *mctx)
        return 0;
 }
 
-static int mod_instantiate(rlm_sql_config_t const *config, void *instance, CONF_SECTION *cs)
+static int mod_instantiate(module_inst_ctx_t const *mctx)
 {
        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;
 
        CassCluster *cluster;
 
@@ -746,8 +747,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(cs, "tls", NULL)) do_tls = true;
-       if (cf_section_find(cs, "latency_aware_routing", NULL)) do_latency_aware_routing = true;
+       if (cf_section_find(conf, "tls", NULL)) do_tls = true;
+       if (cf_section_find(conf, "latency_aware_routing", NULL)) do_latency_aware_routing = true;
 
        DEBUG4("Configuring CassCluster structure");
        cluster = inst->cluster = cass_cluster_new();