提交 35708ec1 编写于 作者: D Daniel Veillard

Fix a counter bug in the log buffer

* src/util/logging.c: the start pointer need to wrap around too
上级 e7aeed00
......@@ -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();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册