aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/bt.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/hw/bt.c b/hw/bt.c
index cf967f8..5016fea 100644
--- a/hw/bt.c
+++ b/hw/bt.c
@@ -211,6 +211,11 @@ static void bt_msg_del(struct bt_msg *bt_msg)
{
list_del(&bt_msg->link);
bt.queue_len--;
+
+ /* once inflight_bt_msg out of list, it should be emptyed */
+ if (bt_msg == inflight_bt_msg)
+ inflight_bt_msg = NULL;
+
unlock(&bt.lock);
ipmi_cmd_done(bt_msg->ipmi_msg.cmd,
IPMI_NETFN_RETURN_CODE(bt_msg->ipmi_msg.netfn),
@@ -393,9 +398,6 @@ static void bt_expire_old_msg(uint64_t tb)
BT_Q_ERR(bt_msg, "Timeout sending message");
bt_msg_del(bt_msg);
- /* Ready to send next message */
- inflight_bt_msg = NULL;
-
/*
* Timing out a message is inherently racy as the BMC
* may start writing just as we decide to kill the