mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2025-03-21 22:07:03 +00:00
Debug file fix
It got mistakenly closed while applying the log configuration.
This commit is contained in:
parent
e85f4e890a
commit
6f1485baf9
@ -512,7 +512,7 @@ log_switch(int initial, list *logs, const char *new_syslog_name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* The filehandle is no longer needed */
|
/* The filehandle is no longer needed */
|
||||||
if (l->rf != &rf_stderr)
|
if ((l->rf != &rf_stderr ) && (l->rf != dbg_rf))
|
||||||
{
|
{
|
||||||
log_lock();
|
log_lock();
|
||||||
rfree(l->rf);
|
rfree(l->rf);
|
||||||
@ -608,8 +608,8 @@ log_switch(int initial, list *logs, const char *new_syslog_name)
|
|||||||
/* Store new mask after opening new files to minimize missing log message race conditions */
|
/* Store new mask after opening new files to minimize missing log message race conditions */
|
||||||
atomic_store_explicit(&ol->mask, ol->new_mask, memory_order_release);
|
atomic_store_explicit(&ol->mask, ol->new_mask, memory_order_release);
|
||||||
|
|
||||||
/* Never close syslog channel */
|
/* Never close syslog channel or debug */
|
||||||
if (ol->new_mask || !ol->rf)
|
if (ol->new_mask || !ol->rf || (ol->rf == dbg_rf))
|
||||||
{
|
{
|
||||||
pprev = &ol->next;
|
pprev = &ol->next;
|
||||||
ol = atomic_load_explicit(pprev, memory_order_acquire);
|
ol = atomic_load_explicit(pprev, memory_order_acquire);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user