From 901e883bc83f9ece4b2ece3d65b3424d35a139d7 Mon Sep 17 00:00:00 2001 From: hcj <1224667075@qq.com> Date: Fri, 26 Dec 2025 17:58:25 +0800 Subject: [PATCH] =?utf8?q?=E4=BF=AE=E6=94=B9socket=E8=B5=B7=E7=82=B9fd?= =?utf8?q?=EF=BC=8C=E4=BF=AE=E5=A4=8D=E5=85=B3=E9=97=ADsocket=E5=BC=82?= =?utf8?q?=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../utils/fs/vfs/nuttx_fs/vfs/operation/fs_close.c | 8 ++++---- .../liteos/src/include/lwip/lwipopts_default.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/code/sdk/middleware/utils/fs/vfs/nuttx_fs/vfs/operation/fs_close.c b/code/sdk/middleware/utils/fs/vfs/nuttx_fs/vfs/operation/fs_close.c index c349a4a9a..63b88c7cd 100644 --- a/code/sdk/middleware/utils/fs/vfs/nuttx_fs/vfs/operation/fs_close.c +++ b/code/sdk/middleware/utils/fs/vfs/nuttx_fs/vfs/operation/fs_close.c @@ -78,7 +78,7 @@ * Assumptions: * ****************************************************************************/ - +extern int lwip_close(int s); int close(int fd) { int errcode; @@ -90,10 +90,10 @@ int close(int fd) { /* Close a socket descriptor */ -#if defined(CONFIG_NET_LWIP_SACK) - if ((unsigned int)fd < (CONFIG_NFILE_DESCRIPTORS + CONFIG_NSOCKET_DESCRIPTORS)) +#if 1 + if (1) { - ret = closesocket(fd); + ret = lwip_close(fd); if (ret < 0) { errcode = -ret; diff --git a/code/sdk/open_source/openharmony/third_party/lwip/lwip_adapter/liteos/src/include/lwip/lwipopts_default.h b/code/sdk/open_source/openharmony/third_party/lwip/lwip_adapter/liteos/src/include/lwip/lwipopts_default.h index 0bee4e3f5..e5d6a5c42 100644 --- a/code/sdk/open_source/openharmony/third_party/lwip/lwip_adapter/liteos/src/include/lwip/lwipopts_default.h +++ b/code/sdk/open_source/openharmony/third_party/lwip/lwip_adapter/liteos/src/include/lwip/lwipopts_default.h @@ -426,7 +426,7 @@ extern "C" { #if defined (LOSCFG_CONFIG_MQTT) #ifndef CONFIG_NFILE_DESCRIPTORS -#define CONFIG_NFILE_DESCRIPTORS 1 +#define CONFIG_NFILE_DESCRIPTORS 128 #endif #endif @@ -1217,7 +1217,7 @@ extern "C" { #endif #ifndef LWIP_COMPAT_SOCKETS -#define LWIP_COMPAT_SOCKETS 1 +#define LWIP_COMPAT_SOCKETS 2 #define LWIP_POSIX_SOCKETS_IO_NAMES 0 #endif -- 2.17.1