mirror of https://gitee.com/openkylin/libvirt.git
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:
parent
e7aeed0067
commit
35708ec151
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue