Skip to contentSkip to conversation

mini-os: Fix xenbus_switch_state's transaction retry

PATCH New Samuel Thibault 1 participant 1 message Apr 6, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mini-os: Fix xenbus_switch_state's transaction retry

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.

extras/mini-os/xenbus/xenbus.c +3 -1
diff -r adce8bc43fcc extras/mini-os/xenbus/xenbus.c
@@ -154,8 +154,10 @@ char *xenbus_switch_state(xenbus_transac
         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);