Skip to content

Commit 218dd04

Browse files
Johan HedbergAnas Nashif
authored andcommitted
Bluetooth: Mesh: Fix mod sub status parameters upon failure
Mesh Profile Specification v1.0, 4.4.1.2.8: "When an element receives a Config Model Subscription Add message or a Config Model Subscription Virtual Address Add message that is not successfully processed (i.e., it results in an error condition listed in Table 4.113), it shall respond with the Config Model Subscription Status message, setting its fields to the values of the corresponding fields (i.e., the identically named fields) of the incoming message and setting the Status field to a status code (defined in Table 4.113), and setting all other fields to 0." The same applies to other Model Subscription messages. Signed-off-by: Johan Hedberg <[email protected]>
1 parent b8bbd74 commit 218dd04

File tree

1 file changed

+1
-5
lines changed
  • subsys/bluetooth/host/mesh

1 file changed

+1
-5
lines changed

subsys/bluetooth/host/mesh/cfg.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1212,11 +1212,7 @@ static void send_mod_sub_status(struct bt_mesh_model *model,
12121212

12131213
net_buf_simple_add_u8(msg, status);
12141214
net_buf_simple_add_le16(msg, elem_addr);
1215-
if (status) {
1216-
net_buf_simple_add_le16(msg, BT_MESH_ADDR_UNASSIGNED);
1217-
} else {
1218-
net_buf_simple_add_le16(msg, sub_addr);
1219-
}
1215+
net_buf_simple_add_le16(msg, sub_addr);
12201216

12211217
if (vnd) {
12221218
memcpy(net_buf_simple_add(msg, 4), mod_id, 4);

0 commit comments

Comments
 (0)