]> xenbits.xensource.com Git - xen.git/commitdiff
tools/ocaml/xenstored: unify watch firing
authorEdwin Török <edvin.torok@citrix.com>
Tue, 15 Dec 2020 13:29:09 +0000 (14:29 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 15 Dec 2020 13:29:09 +0000 (14:29 +0100)
This will make it easier insert additional checks in a follow-up patch.
All watches are now fired from a single function.

This is part of XSA-115.

Signed-off-by: Edwin Török <edvin.torok@citrix.com>
Acked-by: Christian Lindig <christian.lindig@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
tools/ocaml/xenstored/connection.ml

index 24750ada432e0497f576096a5cacac9367d31217..e5df62d9e7e695f2c9ffea2657d992dc2bf30f6b 100644 (file)
@@ -210,8 +210,7 @@ let fire_watch watch path =
                end else
                        path
        in
-       let data = Utils.join_by_null [ new_path; watch.token; "" ] in
-       send_reply watch.con Transaction.none 0 Xenbus.Xb.Op.Watchevent data
+       fire_single_watch { watch with path = new_path }
 
 (* Search for a valid unused transaction id. *)
 let rec valid_transaction_id con proposed_id =