Skip to content

Commit 9dc7598

Browse files
author
Johan Hedberg
committed
Bluetooth: Mesh: Fix checking for bt_mesh_provision() error
There isn't much we can do if this fails, but at least log an error about it. Fixes zephyrproject-rtos#13855 Signed-off-by: Johan Hedberg <[email protected]>
1 parent 6368ed4 commit 9dc7598

File tree

1 file changed

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

1 file changed

+5
-1
lines changed

subsys/bluetooth/host/mesh/prov.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1074,7 +1074,11 @@ static void prov_data(const u8_t *data)
10741074
identity_enable = false;
10751075
}
10761076

1077-
bt_mesh_provision(pdu, net_idx, flags, iv_index, addr, dev_key);
1077+
err = bt_mesh_provision(pdu, net_idx, flags, iv_index, addr, dev_key);
1078+
if (err) {
1079+
BT_ERR("Failed to provision (err %d)", err);
1080+
return;
1081+
}
10781082

10791083
/* After PB-GATT provisioning we should start advertising
10801084
* using Node Identity.

0 commit comments

Comments
 (0)