1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-07 17:28:15 +00:00

Fix a counter bug in the log buffer

* src/util/logging.c: the start pointer need to wrap around too
This commit is contained in:
Daniel Veillard 2011-03-03 15:45:52 +08:00
parent e7aeed0067
commit 35708ec151

View File

@ -271,6 +271,8 @@ static void virLogStr(const char *str, int len) {
tmp = virLogLen - LOG_BUFFER_SIZE;
virLogLen = LOG_BUFFER_SIZE;
virLogStart += tmp;
if (virLogStart >= LOG_BUFFER_SIZE)
virLogStart -= LOG_BUFFER_SIZE;
}
virLogUnlock();
}