From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH] oxenstored: fix del_watches and del_transactions Date: Thu, 18 Jun 2015 10:13:32 +0100 Message-ID: <1434618812.28264.29.camel@citrix.com> References: <1434569989-5774-1-git-send-email-wei.liu2@citrix.com> <745A59CD-7FD7-4DFA-A33D-032974BD7B71@citrix.com> <1434617632.28264.24.camel@citrix.com> <1434617797.28264.26.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Z5VtB-0007Pn-To for xen-devel@lists.xenproject.org; Thu, 18 Jun 2015 09:13:38 +0000 In-Reply-To: <1434617797.28264.26.camel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Dave Scott Cc: Xen-devel , Wei Liu List-Id: xen-devel@lists.xenproject.org On Thu, 2015-06-18 at 09:56 +0100, Ian Campbell wrote: > On Thu, 2015-06-18 at 09:53 +0100, Ian Campbell wrote: > > On Wed, 2015-06-17 at 20:44 +0100, Dave Scott wrote: > > > > On 17 Jun 2015, at 20:39, Wei Liu wrote: > > > > > > > > The statement to reset nb_watches should be in del_watches, not > > > > del_transactions. > > > > > > > > Signed-off-by: Wei Liu > > > > Cc: David Scott > > > > --- > > > > It was only until Ian applied previous patch that I discovered this > > > > copy-n-paste error. Sorry about this. > > > > > > Oh yes I see what you mean. > > > > > > Acked-by: David Scott > > > > Alas: > > File "connection.ml", line 191, characters 17-19: > > Error: Syntax error > > > > If I just need to append a ; to the moved line I can do that on commit, > > if it needs e.g. wrapping in a begin/end or something then I'd best have > > another patch. > > Actually, I think the ; should be on the previous line and the one on > the old previous line should go, like the below. Look correct? It built -- I'll wait for an ok before pushing though. > commit d962aa44e4128ea677ce8407fc2483d94f007d91 > Author: Wei Liu > Date: Wed Jun 17 20:39:49 2015 +0100 > > oxenstored: fix del_watches and del_transactions > > The statement to reset nb_watches should be in del_watches, not > del_transactions. > > Signed-off-by: Wei Liu > Cc: David Scott > Acked-by: David Scott > [ ijc -- fix syntax error by adding a ";" to the previous line in the > new location and removing from the previous line in the old ] > > diff --git a/tools/ocaml/xenstored/connection.ml b/tools/ocaml/xenstored/connection.ml > index 9de4978..0a2c481 100644 > --- a/tools/ocaml/xenstored/connection.ml > +++ b/tools/ocaml/xenstored/connection.ml > @@ -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 > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel