]> 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:01:49 +0000 (21:01 +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 1e21e6eee2f7da10a157e42279a0f021eecbea94..3328f6e212e5db6d8e3be0eed237a97711975f42 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);