From: Ben Pfaff Date: Thu, 3 Jun 2010 18:41:43 +0000 (-0700) Subject: ovs-xenserverd: Fix time-delay logic. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=169e3808f7c510a048589d8e658336919079a6a0;p=openvswitch 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. --- 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]); } }