提交 77d24de6 编写于 作者: M Martin Kletzander

Don't update timer if there's none.

Sometimes virObjectEventStateFlush can be called without timer (if the
last event was unregistered right when the timer fired).  There is a
check for timer == -1, but that triggers warning and other log messages,
which is unnecessary.
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
上级 cc38d566
...@@ -818,7 +818,8 @@ virObjectEventStateFlush(virObjectEventStatePtr state) ...@@ -818,7 +818,8 @@ virObjectEventStateFlush(virObjectEventStatePtr state)
tempQueue.events = state->queue->events; tempQueue.events = state->queue->events;
state->queue->count = 0; state->queue->count = 0;
state->queue->events = NULL; state->queue->events = NULL;
virEventUpdateTimeout(state->timer, -1); if (state->timer != -1)
virEventUpdateTimeout(state->timer, -1);
virObjectEventStateQueueDispatch(state, virObjectEventStateQueueDispatch(state,
&tempQueue, &tempQueue,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册