From a42e9c41888bc6a5446ef6bd95745c9fd023f107 Mon Sep 17 00:00:00 2001 From: Liu Ping Fan Date: Sun, 25 Aug 2013 10:01:21 +0800 Subject: slirp: set mainloop timeout with more precise value If slirp needs to emulate tcp timeout, then the timeout value for mainloop should be more precise, which is determined by slirp's fasttimo or slowtimo. Achieve this by swap the logic sequence of slirp_pollfds_fill and slirp_update_timeout. Signed-off-by: Liu Ping Fan Signed-off-by: Jan Kiszka --- main-loop.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'main-loop.c') diff --git a/main-loop.c b/main-loop.c index 1c38ea2b93..c3c9c28fba 100644 --- a/main-loop.c +++ b/main-loop.c @@ -466,8 +466,7 @@ int main_loop_wait(int nonblocking) g_array_set_size(gpollfds, 0); /* reset for new iteration */ /* XXX: separate device handlers from system ones */ #ifdef CONFIG_SLIRP - slirp_update_timeout(&timeout); - slirp_pollfds_fill(gpollfds); + slirp_pollfds_fill(gpollfds, &timeout); #endif qemu_iohandler_fill(gpollfds); -- cgit v1.2.3