From 89e49d6baeb349ce2d64414c15fa5658a7e95bef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Rymanowski?= Date: Fri, 11 Oct 2019 12:18:11 +0200 Subject: [PATCH] nimble/mesh: Fix provisioning rx_buf initialization This patch fixes regresion after 5f56107d nimble/mesh: Sync provisioning code with Zephyr When PB GATT is not used then rx_buf would be not initialized --- nimble/host/mesh/src/prov.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nimble/host/mesh/src/prov.c b/nimble/host/mesh/src/prov.c index 5c519e75a..4e569ac63 100644 --- a/nimble/host/mesh/src/prov.c +++ b/nimble/host/mesh/src/prov.c @@ -210,6 +210,9 @@ static int reset_state(void) #if (MYNEWT_VAL(BLE_MESH_PB_GATT)) link.rx.buf = bt_mesh_proxy_get_buf(); #else + if (!rx_buf) { + rx_buf = NET_BUF_SIMPLE(65); + } net_buf_simple_init(rx_buf, 0); link.rx.buf = rx_buf; #endif /* PB_GATT */