From c03184efcba31643349c734fbd4b6442782e10b3 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Thu, 7 Jun 2012 09:41:40 +0300 Subject: [PATCH] mgmtops: Fix handling of cmd_status(0) --- plugins/mgmtops.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/mgmtops.c b/plugins/mgmtops.c index cedfbd4b4..a196b1fe7 100644 --- a/plugins/mgmtops.c +++ b/plugins/mgmtops.c @@ -1446,6 +1446,12 @@ static void mgmt_cmd_status(int sk, uint16_t index, void *buf, size_t len) opcode = btohs(bt_get_unaligned(&ev->opcode)); + if (!ev->status) { + DBG("%s (0x%04x) cmd_status %u", mgmt_opstr(opcode), opcode, + ev->status); + return; + } + error("hci%u: %s (0x%04x) failed: %s (0x%02x)", index, mgmt_opstr(opcode), opcode, mgmt_errstr(ev->status), ev->status); -- 2.47.3