From cdabe14bff38e2e9e8dac9ad5d5fe40499cc38e8 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Wed, 7 Apr 2010 08:17:21 +0100 Subject: mini-os: Fix xenbus_switch_state's transaction retry When xenbus_switch_state has to retry the transaction which it just created, it needs to recreate another one. Clearing xbt triggers it. Signed-off-by: Samuel Thibault --- extras/mini-os/xenbus/xenbus.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'extras/mini-os/xenbus') diff --git a/extras/mini-os/xenbus/xenbus.c b/extras/mini-os/xenbus/xenbus.c index 22f109fd07..a8081fd943 100644 --- a/extras/mini-os/xenbus/xenbus.c +++ b/extras/mini-os/xenbus/xenbus.c @@ -154,8 +154,10 @@ char *xenbus_switch_state(xenbus_transaction_t xbt, const char* path, XenbusStat msg = xenbus_write(xbt, path, value); exit: - if (xbt_flag) + if (xbt_flag) { msg2 = xenbus_transaction_end(xbt, 0, &retry); + xbt = XBT_NIL; + } if (msg == NULL && msg2 != NULL) msg = msg2; } while (retry); -- cgit v1.2.3