]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Avoid polling on FDs with no events enabled
authorDaniel P. Berrange <berrange@redhat.com>
Mon, 24 Aug 2009 16:27:55 +0000 (17:27 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Thu, 3 Sep 2009 17:06:16 +0000 (18:06 +0100)
commit34d22c1ed5dfff7ec41d62fa2704d2123d92d65b
treeb1bae38d7467fce62eb679805ecb4c52f615d5da
parent77a1f418c81a2832afd79da8c7abd7094765449d
Avoid polling on FDs with no events enabled

If a file descriptor with events=0 was added to the libvirtd
event loop, it would still be added to the poll() fds' array.
While it wouldn't see any POLLIN/OUT events, it'd still get
triggered for HANGUP/ERROR events which was not in compliance
with the libvirt events API contract.

* qemud/event.c: Don't poll on FDs with events=0
* tests/eventtest.c: Add test case to validate fix to event.c
qemud/event.c
tests/eventtest.c