Skip to contentSkip to conversation

oxenstored: fix del_watches and del_transactions

PATCH In review Wei Liu 3 participants 7 messages Jun 17, 2015 – Jun 18, 2015

lore
Share & tools
lore

Wei Liu

author
#0 lore raw

PATCH 1/1 oxenstored: fix del_watches and del_transactions

The statement to reset nb_watches should be in del_watches, not del_transactions.

Cc David Scott <[email protected]>

---
It was only until Ian applied previous patch that I discovered this copy-n-paste error. Sorry about this.

---
 tools/ocaml/xenstored/connection.ml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/ocaml/xenstored/connection.ml +1 -1
index 9de4978..935939a 100644
@@ -188,10 +188,10 @@ let del_watch con path token =
 
 let del_watches con =
   Hashtbl.clear con.watches
+  con.nb_watches <- 0
 
 let del_transactions con =
   Hashtbl.clear con.transactions;
-  con.nb_watches <- 0
 
 let list_watches con =
 	let ll = Hashtbl.fold 
Signature · 1 line
1.9.1
Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines · Wei Liu

The statement to reset nb_watches should be in del_watches, not del_transactions.

Cc David Scott <[email protected]>

---
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.

Cheers,
Dave

Quoted 23 lines

---
tools/ocaml/xenstored/connection.ml | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
tools/ocaml/xenstored/connection.ml +0 -0
index 9de4978..935939a 100644
@@ -188,10 +188,10 @@ let del_watch con path token =
 

let del_watches con =
Hashtbl.clear con.watches
+ con.nb_watches <- 0

let del_transactions con =
Hashtbl.clear con.transactions;
- con.nb_watches <- 0

let list_watches con =
let ll = Hashtbl.fold

Signature · 1 line
1.9.1
#2 lore raw
Quoted 11 lines · Dave Scott
Quoted 10 lines · Wei Liu

The statement to reset nb_watches should be in del_watches, not del_transactions.

Cc David Scott <[email protected]>

---
It was only until Ian applied previous patch that I discovered this copy-n-paste error. Sorry about this.

Quoted 3 lines

Oh yes I see what you mean.

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.

Ian.

tools/ocaml/xenstored/connection.ml +1 -1
index 9de4978..935939a 100644
@@ -188,10 +188,10 @@ let del_watch con path token =
 
 let del_watches con =
   Hashtbl.clear con.watches
+  con.nb_watches <- 0
 
 let del_transactions con =
   Hashtbl.clear con.transactions;
-  con.nb_watches <- 0
 
 let list_watches con =
        let ll = Hashtbl.fold 
Acked-by David Scott
#3 lore raw
Quoted 16 lines · Ian Campbell
Quoted 11 lines · Dave Scott
Quoted 10 lines · Wei Liu

The statement to reset nb_watches should be in del_watches, not del_transactions.

Cc David Scott <[email protected]>

---
It was only until Ian applied previous patch that I discovered this copy-n-paste error. Sorry about this.

Quoted 3 lines

Oh yes I see what you mean.

Quoted 7 lines

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? commit d962aa44e4128ea677ce8407fc2483d94f007d91

Author: Wei Liu <[email protected]>
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.

[ 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 +3 -3
index 9de4978..0a2c481 100644
@@ -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 
#4 lore raw
Quoted 21 lines · Ian Campbell
Quoted 20 lines · Ian Campbell
Quoted 11 lines · Dave Scott
Quoted 10 lines · Wei Liu

The statement to reset nb_watches should be in del_watches, not del_transactions.

Cc David Scott <[email protected]>

---
It was only until Ian applied previous patch that I discovered this copy-n-paste error. Sorry about this.

Quoted 3 lines

Oh yes I see what you mean.

Alas:
File "connection.ml", line 191, characters 17-19:
Error: Syntax error

Quoted 6 lines
Quoted 3 lines

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.

Quoted 41 lines

commit d962aa44e4128ea677ce8407fc2483d94f007d91

Author: Wei Liu <[email protected]>
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.

[ 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 +3 -3
index 9de4978..0a2c481 100644
@@ -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
[email protected]
http://lists.xen.org/xen-devel

author
#5 lore raw
In reply to Ian Campbell
Quoted 21 lines · Ian Campbell
Quoted 20 lines · Ian Campbell
Quoted 11 lines · Dave Scott
Quoted 10 lines · Wei Liu

The statement to reset nb_watches should be in del_watches, not del_transactions.

Cc David Scott <[email protected]>

---
It was only until Ian applied previous patch that I discovered this copy-n-paste error. Sorry about this.

Quoted 3 lines

Oh yes I see what you mean.

Alas:
File "connection.ml", line 191, characters 17-19:
Error: Syntax error

Quoted 6 lines
Quoted 3 lines

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?

Yes. Thanks for the fix.

(I really shouldn't have worked after 7pm)

Quoted 35 lines

commit d962aa44e4128ea677ce8407fc2483d94f007d91

Author: Wei Liu <[email protected]>
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.

[ 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 +3 -3
index 9de4978..0a2c481 100644
@@ -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 
#6 lore raw
Quoted 22 lines · Wei Liu
Quoted 21 lines · Ian Campbell
Quoted 20 lines · Ian Campbell
Quoted 11 lines · Dave Scott
Quoted 10 lines · Wei Liu

The statement to reset nb_watches should be in del_watches, not del_transactions.

Cc David Scott <[email protected]>

---
It was only until Ian applied previous patch that I discovered this copy-n-paste error. Sorry about this.

Quoted 3 lines

Oh yes I see what you mean.

Alas:
File "connection.ml", line 191, characters 17-19:
Error: Syntax error

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

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?

Yes. Thanks for the fix.

Pushed, thanks.

Quoted 1 line

(I really shouldn't have worked after 7pm)

:-D