From 169e3808f7c510a048589d8e658336919079a6a0 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Thu, 3 Jun 2010 11:41:43 -0700 Subject: [PATCH] ovs-xenserverd: Fix time-delay logic. network_uuid_refresh_run() needs to update pool_conf_mtime as soon as it notices a change. Otherwise it thinks that the mtime has changed every time it is called and therefore never actually runs the refresh script. Bug #2097. --- xenserver/ovs-xenserverd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xenserver/ovs-xenserverd.c b/xenserver/ovs-xenserverd.c index 1598b01b..d2dab51b 100644 --- a/xenserver/ovs-xenserverd.c +++ b/xenserver/ovs-xenserverd.c @@ -197,6 +197,7 @@ network_uuid_refresh_run(void) get_mtime("/etc/xensource/pool.conf", &new_mtime); if (new_mtime.tv_sec != pool_conf_mtime.tv_sec || new_mtime.tv_nsec != pool_conf_mtime.tv_nsec) { + pool_conf_mtime = new_mtime; next_refresh = time_msec() + 10 * 1000; return; } @@ -225,7 +226,6 @@ network_uuid_refresh_run(void) argv[0], strerror(errno)); } - pool_conf_mtime = new_mtime; free(argv[0]); } } -- 2.30.2