diff options
author | Chris Leech <cleech@redhat.com> | 2018-06-13 08:08:46 -0700 |
---|---|---|
committer | Chris Leech <cleech@redhat.com> | 2018-06-13 09:00:01 -0700 |
commit | bd23f637dabed001789f6551fb6062ee64133a74 (patch) | |
tree | c35afc7ed3323d26a11e6074c3ca3d781ddae85a /usr | |
parent | 4bf7a9898f9536a0a8a32c94e6e6555da18b2391 (diff) | |
download | open-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.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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 */ |