Re: [PATCH 3/6] Skip deleted timers when calculting next timeout

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

 



On 11/22/2012 05:48 PM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
> 
> It is possible for there to be deleted timers when we
> calculate the next timeout, and they must be skipped.
> 
> Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
> ---
>  src/util/event_poll.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/src/util/event_poll.c b/src/util/event_poll.c
> index 2ffa94b..53b9c6c 100644
> --- a/src/util/event_poll.c
> +++ b/src/util/event_poll.c
> @@ -332,6 +332,8 @@ static int virEventPollCalculateTimeout(int *timeout) {
>      EVENT_DEBUG("Calculate expiry of %zu timers", eventLoop.timeoutsCount);
>      /* Figure out if we need a timeout */
>      for (i = 0 ; i < eventLoop.timeoutsCount ; i++) {
> +        if (eventLoop.timeouts[i].deleted)
> +            continue;
>          if (eventLoop.timeouts[i].frequency < 0)
>              continue;
>  
> 

ACK,

Martin

--
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]