From 771a105b2880e6b40098d7a303400b3525a95df1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Edwin=20T=C3=B6r=C3=B6k?= Date: Tue, 15 Dec 2020 14:37:00 +0100 Subject: [PATCH] tools/ocaml/xenstored: unify watch firing MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Acked-by: Christian Lindig Reviewed-by: Andrew Cooper --- tools/ocaml/xenstored/connection.ml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/ocaml/xenstored/connection.ml b/tools/ocaml/xenstored/connection.ml index be9c62f27f..d7432c6597 100644 --- a/tools/ocaml/xenstored/connection.ml +++ b/tools/ocaml/xenstored/connection.ml @@ -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 = -- 2.39.5