]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/xen.git/commitdiff
oxenstored: fix del_watches and del_transactions
authorWei Liu <wei.liu2@citrix.com>
Wed, 17 Jun 2015 19:39:49 +0000 (20:39 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 18 Jun 2015 08:54:27 +0000 (09:54 +0100)
The statement to reset nb_watches should be in del_watches, not
del_transactions.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: David Scott <dave.scott@citrix.com>
Acked-by: David Scott <dave.scott@citrix.com>
[ ijc -- fix syntax error by adding a ";" to the previous line in the
         new location and removing from the previous line in the old ]

tools/ocaml/xenstored/connection.ml

index 9de49780da695e483d70c1e2f814ed16495b012c..0a2c481ee618a646c841b189d1d161f745e42955 100644 (file)
@@ -187,11 +187,11 @@ let del_watch con path token =
        apath, w
 
 let del_watches con =
-  Hashtbl.clear con.watches
+  Hashtbl.clear con.watches;
+  con.nb_watches <- 0
 
 let del_transactions con =
-  Hashtbl.clear con.transactions;
-  con.nb_watches <- 0
+  Hashtbl.clear con.transactions
 
 let list_watches con =
        let ll = Hashtbl.fold