From ce7d1c6ca6a08dcefa2b55c5c7db661f1761d775 Mon Sep 17 00:00:00 2001 From: NightIsDark <935528249@qq.com> Date: Thu, 27 May 2021 17:33:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E8=AE=A2PR=E9=82=AE=E7=AE=B1=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E6=97=A0=E6=B3=95=E7=AD=BE=E7=BD=B2CLA=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/net/sal_socket/src/sal_socket.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/net/sal_socket/src/sal_socket.c b/components/net/sal_socket/src/sal_socket.c index 982ab2d08d..19f1af5358 100644 --- a/components/net/sal_socket/src/sal_socket.c +++ b/components/net/sal_socket/src/sal_socket.c @@ -619,7 +619,8 @@ int sal_accept(int socket, struct sockaddr *addr, socklen_t *addrlen) LOG_E("New socket registered failed, return error %d.", retval); return -1; } - + /* new socket create by accept should have the same netdev with server*/ + new_sock->netdev = sock->netdev; /* socket structure user_data used to store the acquired new socket */ new_sock->user_data = (void *) new_socket;