]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Logs: Reset found_old flags in struct log_config
authorKaterina Kubecova <katerina.kubecova@nic.cz>
Mon, 12 May 2025 14:43:36 +0000 (16:43 +0200)
committerMaria Matejka <mq@ucw.cz>
Sun, 25 May 2025 19:02:51 +0000 (21:02 +0200)
When recycling an existing configuration (configure undo), the found_old
flags were already set. Due to this oversight, log files failed to
reopen on configure undo.

This fixes #188.

sysdep/unix/log.c

index 3bcdd931c9384493a3251a4d0dcbf348728d07e4..b8ac47007305ee1d5d5c7376704125248ff0dba0 100644 (file)
@@ -528,6 +528,13 @@ default_log_list(int initial, const char **syslog_name)
 void
 log_switch(int initial, list *logs, const char *new_syslog_name)
 {
+  if (logs)
+  {
+    struct log_config *l;
+    WALK_LIST(l, *logs)
+      l->found_old = 0;
+  }
+
   if (initial)
   {
     log_domain = DOMAIN_NEW(logging);