mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/host_flw_ctrl_v5.1' into 'release/v5.1'
NimBLE: Fixed mismatch of number of completed packtes in host flow control (v5.1) See merge request espressif/esp-idf!23854
This commit is contained in:
commit
d25df894fa
@ -185,14 +185,14 @@ notify_task(void *arg)
|
||||
|
||||
/* Check if the MBUFs are available */
|
||||
if (os_msys_num_free() >= MIN_REQUIRED_MBUF) {
|
||||
om = ble_hs_mbuf_from_flat(payload, sizeof(payload));
|
||||
if (om == NULL) {
|
||||
/* Memory not available for mbuf */
|
||||
ESP_LOGE(tag, "No MBUFs available from pool, retry..");
|
||||
vTaskDelay(100 / portTICK_PERIOD_MS);
|
||||
do {
|
||||
om = ble_hs_mbuf_from_flat(payload, sizeof(payload));
|
||||
assert(om != NULL);
|
||||
}
|
||||
if (om == NULL) {
|
||||
/* Memory not available for mbuf */
|
||||
ESP_LOGE(tag, "No MBUFs available from pool, retry..");
|
||||
vTaskDelay(100 / portTICK_PERIOD_MS);
|
||||
}
|
||||
} while (om == NULL);
|
||||
|
||||
rc = ble_gatts_notify_custom(conn_handle, notify_handle, om);
|
||||
if (rc != 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user