summaryrefslogtreecommitdiff
path: root/sysdep/unix
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2023-01-19 13:24:12 +0100
committerMaria Matejka <mq@ucw.cz>2023-01-19 18:17:05 +0100
commit1127f19a7a12b162064b1f521acd5c0017fbcf89 (patch)
treec80db6f02d775cf1b29809ae3b5e5c1f7cd9fb33 /sysdep/unix
parent84c298465f6360a8694d4837f3420961ea321fa5 (diff)
parent140c534fb81d0e165b7d674e869c646455ed19d1 (diff)
Merge commit '140c534fb81d0e165b7d674e869c646455ed19d1' into thread-next
Diffstat (limited to 'sysdep/unix')
-rw-r--r--sysdep/unix/main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sysdep/unix/main.c b/sysdep/unix/main.c
index 01cc0c93..b15376cc 100644
--- a/sysdep/unix/main.c
+++ b/sysdep/unix/main.c
@@ -245,6 +245,8 @@ async_config(void)
{
struct config *conf;
+ config_free_old();
+
log(L_INFO "Reconfiguration requested by SIGHUP");
if (!unix_read_config(&conf, config_name))
{
@@ -283,6 +285,9 @@ cmd_read_config(const char *name)
void
cmd_check_config(const char *name)
{
+ if (cli_access_restricted())
+ return;
+
struct config *conf = cmd_read_config(name);
if (!conf)
return;
@@ -327,6 +332,8 @@ cmd_reconfig(const char *name, int type, uint timeout)
if (cli_access_restricted())
return;
+ config_free_old();
+
struct config *conf = cmd_read_config(name);
if (!conf)
return;