forked from Mirror/frr
Merge pull request #17775 from gromit1811/pr_journald_bugfix
This commit is contained in:
commit
a97be61de8
|
@ -782,7 +782,7 @@ static void zlog_5424_cycle(struct zlog_cfg_5424 *zcf, int fd)
|
|||
}
|
||||
|
||||
old = zcf->active ? &zcf->active->zt : NULL;
|
||||
old = zlog_target_replace(old, &zlt->zt);
|
||||
old = zlog_target_replace(old, zlt ? &zlt->zt : NULL);
|
||||
zcf->active = zlt;
|
||||
|
||||
/* oldt->fd == fd happens for zlog_5424_apply_meta() */
|
||||
|
@ -1076,9 +1076,17 @@ bool zlog_5424_apply_dst(struct zlog_cfg_5424 *zcf)
|
|||
|
||||
bool zlog_5424_apply_meta(struct zlog_cfg_5424 *zcf)
|
||||
{
|
||||
int fd;
|
||||
|
||||
frr_with_mutex (&zcf->cfg_mtx) {
|
||||
if (zcf->active)
|
||||
zlog_5424_cycle(zcf, zcf->active->fd);
|
||||
fd = zcf->active->fd;
|
||||
else if (zcf->prio_min != ZLOG_DISABLED)
|
||||
fd = zlog_5424_open(zcf, -1);
|
||||
else
|
||||
fd = -1;
|
||||
if (fd >= 0)
|
||||
zlog_5424_cycle(zcf, fd);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue