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 #13855

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2019-03-13 09:00:05 +02:00 committed by Kumar Gala
commit 0299db7303

View file

@ -1074,7 +1074,11 @@ static void prov_data(const u8_t *data)
identity_enable = false;
}
bt_mesh_provision(pdu, net_idx, flags, iv_index, addr, dev_key);
err = bt_mesh_provision(pdu, net_idx, flags, iv_index, addr, dev_key);
if (err) {
BT_ERR("Failed to provision (err %d)", err);
return;
}
/* After PB-GATT provisioning we should start advertising
* using Node Identity.