From 1684d63e04e9f18594b4f873d26033b6286239f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kuba=20Szczodrzy=C5=84ski?= Date: Thu, 30 Jun 2022 16:28:29 +0200 Subject: [PATCH] [beken-72xx] Fix lwip_ioctl() given wrong argument size --- README.md | 2 +- arduino/libretuya/libraries/NetUtils/lwip/LwIPRxBuffer.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4c3859a..3f5cb02 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ Wire | ❗ | ❌ **OTHER LIBRARIES** | | Wi-Fi STA/AP/Mixed | ✔️ | ✔️/❌/❌ Wi-Fi Events | ✔️ | ❌ -TCP Client (SSL) | ✔️ (✔️) | ❗ (❓) +TCP Client (SSL) | ✔️ (✔️) | ✔️ (❓) TCP Server | ✔️ | ❓ IPv6 | ❌ | ❌ HTTP Client (SSL) | ✔️ (✔️) | ❓ diff --git a/arduino/libretuya/libraries/NetUtils/lwip/LwIPRxBuffer.cpp b/arduino/libretuya/libraries/NetUtils/lwip/LwIPRxBuffer.cpp index fecf26f..8d60aed 100644 --- a/arduino/libretuya/libraries/NetUtils/lwip/LwIPRxBuffer.cpp +++ b/arduino/libretuya/libraries/NetUtils/lwip/LwIPRxBuffer.cpp @@ -17,8 +17,8 @@ size_t LwIPRxBuffer::r_available() { LT_D_WC("_sock < 0"); return 0; } - uint16_t count = 0; - int res = lwip_ioctl(_sock, FIONREAD, &count); + int count = 0; // must be of same size as in lwip_ioctl() + int res = lwip_ioctl(_sock, FIONREAD, &count); if (res < 0) { LT_D_WC("lwip_ioctl()=%d, errno=%d", res, errno); _failed = true;