]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Don't start the sigtran thread if we're just checking the config
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 17 Jul 2018 22:47:00 +0000 (18:47 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 17 Jul 2018 22:47:00 +0000 (18:47 -0400)
src/modules/rlm_sigtran/rlm_sigtran.c

index 97a3b3dba2a4849d4bf93121286a2ea8bd9049b4..f3debdf107e5d06db725c43d31a14ea5cbaf502e 100644 (file)
@@ -327,6 +327,12 @@ static int mod_instantiate(void *instance, CONF_SECTION *conf)
        if (sigtran_sccp_sockaddr_from_conf(inst, inst, &inst->conn_conf.sccp_calling_sockaddr,
                                            &inst->conn_conf.sccp_calling, conf) < 0) return -1;
 
+       /*
+        *      Don't bother starting the sigtran thread if we're
+        *      just checking the config.
+        */
+       if (check_config) return 0;
+
        /*
         *      If this is the first instance of rlm_sigtran
         *      We spawn a new thread to run all the libosmo-* I/O
@@ -357,6 +363,12 @@ static int mod_detach(UNUSED void *instance)
 {
        rlm_sigtran_t *inst = instance;
 
+       /*
+        *      If we're just checking the config we didn't start the
+        *      thread.
+        */
+       if (check_config) return 0;
+
        sigtran_client_link_down(&inst->conn);
 
        if ((--sigtran_instances) == 0) sigtran_event_exit();