[PATCH btbridge v4 1/8] Remove logic to check for message resends.
OpenBMC Patches
patches at stwcx.xyz
Fri Oct 30 23:42:07 AEDT 2015
From: Cyril Bur <cyril.bur at au1.ibm.com>
The current logic causes problems and needs to be more sophisticated, more
sophistication has no place at this level and can handled be at a later
stage of processing.
---
btbridged.c | 18 ------------------
1 file changed, 18 deletions(-)
diff --git a/btbridged.c b/btbridged.c
index f9c5703..932355a 100644
--- a/btbridged.c
+++ b/btbridged.c
@@ -77,8 +77,6 @@ struct bt_queue {
struct btbridged_context{
int debug;
- uint8_t last_seq;
- int started;
struct pollfd fds[TOTAL_FDS];
struct sd_bus *bus;
struct bt_queue *bt_q;
@@ -488,21 +486,6 @@ static int dispatch_bt(struct btbridged_context *context)
goto out1;
}
- /*
- * If the host sent us a retry, the seq number will not have
- * incremented. Drop the message otherwise we might send duplicate
- * responses.
- * This should deal with when last_seq is 0xff with overflow back
- * to zero.
- */
- if (data[2] != context->last_seq + 1 && context->started) {
- MSG_ERR("Received a retry from the host, dropping seq 0x%02x vs 0x%02x\n", data[2], context->last_seq);
- r = 0;
- goto out1;
- }
- context->started = 1;
- context->last_seq = data[2];
-
new = bt_q_enqueue(context, data);
if (!new) {
r = -ENOMEM;
@@ -587,7 +570,6 @@ int main(int argc, char *argv[]) {
{0, 0, 0, 0}
};
- context.started = 0;
context.debug = 0;
context.bt_q = NULL;
--
2.6.0
More information about the openbmc
mailing list