Skip to content

Commit a2057cd

Browse files
Thalleycarlescufi
authored andcommitted
Bluetooth: Audio: Fixed naming of invalid length ASCS response
The "Invalid Length" response code was called truncated, which does not match the spec definition. Signed-off-by: Emil Gydesen <[email protected]>
1 parent 52db790 commit a2057cd

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

subsys/bluetooth/audio/ascs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -889,7 +889,7 @@ static void ascs_cp_rsp_add(uint8_t id, uint8_t op, uint8_t code,
889889
* set to 0xFF.
890890
*/
891891
case BT_ASCS_RSP_NOT_SUPPORTED:
892-
case BT_ASCS_RSP_TRUNCATED:
892+
case BT_ASCS_RSP_INVALID_LENGTH:
893893
rsp->num_ase = 0xff;
894894
break;
895895
default:
@@ -2649,7 +2649,7 @@ static ssize_t ascs_cp_write(struct bt_conn *conn,
26492649
}
26502650

26512651
if (ret == BT_GATT_ERR(BT_ATT_ERR_INVALID_ATTRIBUTE_LEN)) {
2652-
ascs_cp_rsp_add(0, req->op, BT_ASCS_RSP_TRUNCATED,
2652+
ascs_cp_rsp_add(0, req->op, BT_ASCS_RSP_INVALID_LENGTH,
26532653
BT_ASCS_REASON_NONE);
26542654
}
26552655

subsys/bluetooth/audio/ascs_internal.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
/* Response Status Code */
1111
#define BT_ASCS_RSP_SUCCESS 0x00
1212
#define BT_ASCS_RSP_NOT_SUPPORTED 0x01
13-
#define BT_ASCS_RSP_TRUNCATED 0x02
13+
#define BT_ASCS_RSP_INVALID_LENGTH 0x02
1414
#define BT_ASCS_RSP_INVALID_ASE 0x03
1515
#define BT_ASCS_RSP_INVALID_ASE_STATE 0x04
1616
#define BT_ASCS_RSP_INVALID_DIR 0x05
@@ -299,8 +299,8 @@ static inline const char *bt_ascs_rsp_str(uint8_t code)
299299
return "Success";
300300
case BT_ASCS_RSP_NOT_SUPPORTED:
301301
return "Unsupported Opcode";
302-
case BT_ASCS_RSP_TRUNCATED:
303-
return "Truncated Operation";
302+
case BT_ASCS_RSP_INVALID_LENGTH:
303+
return "Invalid Length";
304304
case BT_ASCS_RSP_INVALID_ASE:
305305
return "Invalid ASE_ID";
306306
case BT_ASCS_RSP_INVALID_ASE_STATE:

0 commit comments

Comments
 (0)