### Releases v1.0.2

1. Make Mutex Lock and delete more reliable and error-proof to prevent random crash.
This commit is contained in:
Khoi Hoang
2020-11-09 03:59:44 -05:00
committed by GitHub
parent 2d31dc247c
commit b5831c36a1
33 changed files with 2832 additions and 230 deletions

View File

@@ -1,5 +1,5 @@
/****************************************************************************************************************************
src_cpp/utility/xbuf_Impl.h - Dead simple AsyncHTTPRequest for ESP8266, ESP32 and currently STM32 with built-in LAN8742A Ethernet
xbuf_Impl.h - Dead simple AsyncHTTPRequest for ESP8266, ESP32 and currently STM32 with built-in LAN8742A Ethernet
For ESP8266, ESP32 and STM32 with built-in LAN8742A Ethernet (Nucleo-144, DISCOVERY, etc)
@@ -17,12 +17,13 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Version: 1.0.1
Version: 1.0.2
Version Modified By Date Comments
------- ----------- ---------- -----------
1.0.0 K Hoang 14/09/2020 Initial coding to add support to STM32 using built-in Ethernet (Nucleo-144, DISCOVERY, etc).
1.0.1 K Hoang 09/10/2020 Restore cpp code besides Impl.h code.
1.0.2 K Hoang 09/11/2020 Make Mutex Lock and delete more reliable and error-proof
*****************************************************************************************************************************/
#include "utility/xbuf.h"
@@ -361,14 +362,20 @@ void xbuf::addSeg()
if (_tail)
{
_tail->next = (xseg*) new uint32_t[_segSize / 4 + 1];
// KH, Must check NULL here
_tail = _tail->next;
}
else
{
// KH, Must check NULL here
_tail = _head = (xseg*) new uint32_t[_segSize / 4 + 1];
}
_tail->next = nullptr;
// KH, Must check NULL here
if (_tail)
_tail->next = nullptr;
_free += _segSize;
}