ringbuf: Fix bug where comparision between a signed and unsigned operand resulted in incorrect free size for no-split/allow-split buffers (v4.1)
See merge request espressif/esp-idf!15884
This commit fixes a bug in no-split and allow-split ring buffers free buffer size calculation.
When the free size available in the buffers less than the size of one item header,
the function prvGetCurMaxSizeNoSplit/AllowSplit() incorrectly returned the maxItemSize instead of 0.
This is due to the comparision between a negative and a positive value
where both operands are treated as unsigned during the comparision operation,
thereby treating the negative operand as a large integer.
Also added new unit tests to test buffer-full and almost-full conditions
where this scenario is likely to be hit.
Closes https://github.com/espressif/esp-idf/issues/7344
Closes https://github.com/espressif/esp-idf/pull/7371
* Better comment of nvs_get_used_entry_count()
* Mention C++ example in API reference
* WIP: Used target instead of hard code ESP32
* Note that strings can only span one page
* Reflect that item types have been moved
* Some clarification about nvs_commit()
* Improved reference to the ESP Partition API
* fixed little mistake in documenting-code.rst
* Change of nvs_open_from_part() to
nvs_open_from_partition() reflected in docs
* Corrected documentation of
NVSHandle::get_string(), NVSHandle::get_blob()
and NVSHandle::get_item_size().
* Closes IDF-1563
* Closes IDF-859
* Closes https://github.com/espressif/esp-idf/issues/6123
1. fix(pp): fix fragment plt loss when 2td pn compare with 1th pn
2. pmf allow keyindex in big endian format to workaround faulty APs
3. docs: update miswritten and abbreviated words and syntax errors for initialize WiFi section in esp_wifi.h header file
4. allow for minimal scope of wifi_init_config_t
1. Fix airkiss and esptouch find channel crash issue
2. Fix issue of softAP not initating 4-way handshake if max length passphrase is set
3. Fix issue of esptouch find hidden AP fail
4. Clear hostpot bss when auth timeout happens
5. Fix not connect to open AP when WPA3 auth fail
6. Fix issue with hidden AP scans after connecting AP
7. Fix the watchdog issue when receiving action frame
8. Fix set config return value error
9. Fix the issue of reason code change from 15 to 204 when provide wrong password
10. Fix ampdu age timer memory leak
11. Fix issue of esp_wifi_80211_tx
12. Fix crash issue in presence of WEP AP
13. Fix the MIC comparison logic AES-128-CMAC decryption
14. Fix issue of setting incorrect log_length of NVS misc log
15. Fix SoftAP crash by handling public action frames
16. Fix a bug that Wi-Fi stack may crash when receive AMSDU length bigger then 3200
which blocks BlueZ from reconnecting
2.fix the issue bt_spp_acceptor example fails when SPP is initiated
on a windows machine using Realtek Bluetooth adapter
3.fix the issue HCI_Read_Clock failed read local Bluetooth Clock
4.It is abnormal when getting the deep sleep state bit. So we need to
check the state again and run the "ble_master_soft_rst()" if neesed.
For the CID10564,10384,10280,10098,10038,The memory was released in other place.
For the CID10365,it release the memory in the function when sent successfully.
For the CID10268,10011, we need not change the code.
The release of the semaphore indicating the item was successfully sent must be the last semaphore released. The receiver may be in another task and may delete the Ringbuffer (such as with a return code across tasks design pattern) if they are through with the Ringbuffer.
The function xRingbufferSendAcquire followed by xRingbufferSendComplete had the semaphores released in the proper order and that same pattern should have been used in xRingbufferSend and xRingbufferSendFromISR. This commit fixes this order.
Issue (IDFGH-6030) #7716 describes the problem in more detail.
Closes IDFGH-6030, https://github.com/espressif/esp-idf/issues/7716
Closes IDFGH-6036, https://github.com/espressif/esp-idf/pull/7721