summaryrefslogtreecommitdiff
path: root/usr
diff options
context:
space:
mode:
authorChris Leech <cleech@redhat.com>2018-06-13 08:08:46 -0700
committerChris Leech <cleech@redhat.com>2018-06-13 09:00:01 -0700
commitbd23f637dabed001789f6551fb6062ee64133a74 (patch)
treec35afc7ed3323d26a11e6074c3ca3d781ddae85a /usr
parent4bf7a9898f9536a0a8a32c94e6e6555da18b2391 (diff)
downloadopen-iscsi-bd23f637dabed001789f6551fb6062ee64133a74.tar.gz
iscsid logging blank messages at level EMERG
reset head on wrap when buffer empty Reported-By: David Jeffery <djeffery@redhat.com>
Diffstat (limited to 'usr')
-rw-r--r--usr/log.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/usr/log.c b/usr/log.c
index 26c61d8..b730642 100644
--- a/usr/log.c
+++ b/usr/log.c
@@ -189,6 +189,9 @@ int log_enqueue (int prio, const char * fmt, va_list ap)
(len + sizeof(struct logmsg)) > (la->end - la->tail)) {
logdbg(stderr, "enqueue: rewind tail to %p\n", la->tail);
la->tail = la->start;
+
+ if (la->empty)
+ la->head = lastmsg = la->tail;
}
/* not enough space on head : drop msg */