Diff between 70489204d769568707d9a7607981c197e935391e and bca537e81493f11e99cc47ed7eb7d179410ee762

Changed Files

File Additions Deletions Status
src/shared/att.c +5 -6 modified

Full Patch

diff --git a/src/shared/att.c b/src/shared/att.c
index b920eb8..3b37cdf 100644
--- a/src/shared/att.c
+++ b/src/shared/att.c
@@ -679,14 +679,13 @@ static bool opcode_match(uint8_t opcode, uint8_t test_opcode)
 
 static void respond_not_supported(struct bt_att *att, uint8_t opcode)
 {
-	uint8_t pdu[4];
+	struct bt_att_pdu_error_rsp pdu;
 
-	pdu[0] = opcode;
-	pdu[1] = 0;
-	pdu[2] = 0;
-	pdu[3] = BT_ATT_ERROR_REQUEST_NOT_SUPPORTED;
+	pdu.opcode = opcode;
+	pdu.handle = 0x0000;
+	pdu.ecode = BT_ATT_ERROR_REQUEST_NOT_SUPPORTED;
 
-	bt_att_send(att, BT_ATT_OP_ERROR_RSP, pdu, sizeof(pdu), NULL, NULL,
+	bt_att_send(att, BT_ATT_OP_ERROR_RSP, &pdu, sizeof(pdu), NULL, NULL,
 									NULL);
 }