Pass the management message body to event callbacks
For parsing purposes it's more practical to simply pass the message body
instead of the entire packet to the individual callbacks.
diff --git a/plugins/mgmtops.c b/plugins/mgmtops.c
index 7cad0c3..e311be8 100644
--- a/plugins/mgmtops.c
+++ b/plugins/mgmtops.c
@@ -110,13 +110,13 @@
switch (opcode) {
case HCI_MGMT_EV_CMD_COMPLETE:
- mgmt_cmd_complete(sk, buf, ret);
+ mgmt_cmd_complete(sk, buf + HCI_MGMT_HDR_SIZE, len);
break;
case HCI_MGMT_EV_CMD_STATUS:
- mgmt_cmd_status(sk, buf, ret);
+ mgmt_cmd_status(sk, buf + HCI_MGMT_HDR_SIZE, len);
break;
case HCI_MGMT_EV_CONTROLLER_ERROR:
- mgmt_controller_error(sk, buf, ret);
+ mgmt_controller_error(sk, buf + HCI_MGMT_HDR_SIZE, len);
break;
default:
error("Unknown Management opcode %u", opcode);