1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-07 17:28:15 +00:00

Don't call disabled timer callbacks in event-test.c

This fixes a segfault in the remote driver that occurs for example when
the event-test is run inside a domain-0 and libvirtd is also running.
This commit is contained in:
Matthias Bolte 2010-01-26 02:54:34 +01:00
parent ef088ed962
commit 7f7676e77b

View File

@ -335,9 +335,10 @@ int main(int argc, char **argv)
sts = poll(&pfd, 1, TIMEOUT_MS); sts = poll(&pfd, 1, TIMEOUT_MS);
/* We are assuming timeout of 0 here - so execute every time */ /* if t_timeout < 0 then t_cb must not be called */
if(t_cb && t_active) if (t_cb && t_active && t_timeout >= 0) {
t_cb(t_timeout,t_opaque); t_cb(t_timeout,t_opaque);
}
if (sts == 0) { if (sts == 0) {
/* DEBUG0("Poll timeout"); */ /* DEBUG0("Poll timeout"); */