summaryrefslogtreecommitdiff
path: root/lib/command.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@diac24.net>2021-04-10 21:02:06 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2021-04-21 16:25:33 +0200
commitdb2baed166581081db692fab0214752dbb121ed3 (patch)
tree67083421d6ac85080aa010ca9ef9ddf9cfc63be2 /lib/command.c
parentbf6005d5f4f893817723e26b844831c22532f2f1 (diff)
lib: fix possible assert() fail in zlog_fd()
If the last message in a batched logging operation isn't printed due to priority, this skips the code that flushes prepared messages through writev() and can trigger the assert() at the end of zlog_fd(). Since any logmsg above info priority triggers a buffer flush, running into this situation requires a log file target configured for info priority, at least 1 message of info priority buffered, a debug message buffered after that, and then a buffer flush (explicit or due to buffer full). I haven't seen this chain of events happen in the wild, but it needs fixing anyway. Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'lib/command.c')
0 files changed, 0 insertions, 0 deletions