From: Arran Cudbard-Bell Date: Tue, 17 Jul 2018 22:47:00 +0000 (-0400) Subject: Don't start the sigtran thread if we're just checking the config X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b89a4ea19bbbb80cbe660388716008d9bd198cf7;p=thirdparty%2Ffreeradius-server.git Don't start the sigtran thread if we're just checking the config --- diff --git a/src/modules/rlm_sigtran/rlm_sigtran.c b/src/modules/rlm_sigtran/rlm_sigtran.c index 97a3b3dba2a..f3debdf107e 100644 --- a/src/modules/rlm_sigtran/rlm_sigtran.c +++ b/src/modules/rlm_sigtran/rlm_sigtran.c @@ -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();