]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Clean timer in virObjectEventStateFlush
authorMartin Kletzander <mkletzan@redhat.com>
Tue, 11 Oct 2016 11:44:21 +0000 (13:44 +0200)
committerMartin Kletzander <mkletzan@redhat.com>
Wed, 12 Oct 2016 10:54:47 +0000 (12:54 +0200)
commit44bf83e313b7567be1097c3e971b3e2b6c8e3601
tree7abe3c95c25801255ab5ace490a6c23028ed66be
parent6fecf9523a1c05fa71e7c4713282ae59c5e670d4
Clean timer in virObjectEventStateFlush

If the last event callback is unregistered while the event loop is
dispatching, it is only marked as deleted, but not removed.  The number
of callbacks is more than zero in that case, so the timer is not
removed.  Because it can be removed in this function now (but also
accessed afterwards so that we set 'isDispatching = false' and have it
locked), we need to temporarily increase the reference counter of the
state for the duration of this function.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
src/conf/object_event.c