Re: [PATCH 1/2] Don't update timer if there's none.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07.10.2016 19:52, Martin Kletzander wrote:
> 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: Martin Kletzander <mkletzan@xxxxxxxxxx>
> ---
>  src/conf/object_event.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/conf/object_event.c b/src/conf/object_event.c
> index b5a6a81a3a04..e5af4be68a7e 100644
> --- a/src/conf/object_event.c
> +++ b/src/conf/object_event.c
> @@ -818,7 +818,8 @@ virObjectEventStateFlush(virObjectEventStatePtr state)
>      tempQueue.events = state->queue->events;
>      state->queue->count = 0;
>      state->queue->events = NULL;
> -    virEventUpdateTimeout(state->timer, -1);
> +    if (state->timer != -1)
> +        virEventUpdateTimeout(state->timer, -1);
> 
>      virObjectEventStateQueueDispatch(state,
>                                       &tempQueue,
> 

ACK.

Michal

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]