Skip to content

Commit c9140ca

Browse files
committed
Merge branch 'bugfix/no_proxy_beacon_send_after_deinit_v4.4' into 'release/v4.4'
ble_mesh: stack: Bugfix for proxy beacon send after reinit mesh(v4.4) See merge request espressif/esp-idf!18791
2 parents 9616ef8 + 23e482f commit c9140ca

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

components/bt/esp_ble_mesh/mesh_core/proxy_server.c

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,7 @@ static struct bt_mesh_proxy_client {
9292
#endif
9393
struct k_delayed_work sar_timer;
9494
struct net_buf_simple buf;
95-
} clients[BLE_MESH_MAX_CONN] = {
96-
[0 ... (BLE_MESH_MAX_CONN - 1)] = {
97-
#if defined(CONFIG_BLE_MESH_GATT_PROXY_SERVER)
98-
.send_beacons = _K_WORK_INITIALIZER(proxy_send_beacons),
99-
#endif
100-
},
101-
};
95+
} clients[BLE_MESH_MAX_CONN];
10296

10397
static uint8_t client_buf_data[CLIENT_BUF_SIZE * BLE_MESH_MAX_CONN];
10498

@@ -1459,7 +1453,9 @@ int bt_mesh_proxy_server_init(void)
14591453

14601454
client->buf.size = CLIENT_BUF_SIZE;
14611455
client->buf.__buf = client_buf_data + (i * CLIENT_BUF_SIZE);
1462-
1456+
#if defined(CONFIG_BLE_MESH_GATT_PROXY_SERVER)
1457+
k_work_init(&client->send_beacons, proxy_send_beacons);
1458+
#endif
14631459
k_delayed_work_init(&client->sar_timer, proxy_sar_timeout);
14641460
}
14651461

0 commit comments

Comments
 (0)