Projects
openEuler:22.03:LTS:SP1
gazelle
_service:tar_scm_kernel_repo:0168-fix-tcp-recv-...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm_kernel_repo:0168-fix-tcp-recv-does-not-return-pkg-when-ring-buffer-is.patch of Package gazelle
From 5fff605ff68741482d7fff992343eaccb383115f Mon Sep 17 00:00:00 2001 From: li_yunqing <liyunqing@kylinos.cn> Date: Fri, 22 Mar 2024 15:47:19 +0800 Subject: [PATCH] fix tcp recv does not return pkg when ring buffer is empty --- src/lstack/core/lstack_lwip.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lstack/core/lstack_lwip.c b/src/lstack/core/lstack_lwip.c index a604a62..51238ba 100644 --- a/src/lstack/core/lstack_lwip.c +++ b/src/lstack/core/lstack_lwip.c @@ -925,7 +925,9 @@ static ssize_t recv_ring_tcp_read(struct lwip_sock *sock, void *buf, size_t len, } while (recv_left > 0) { - if (recv_ring_get_one(sock, noblock, &pbuf) != 0) { + if (recv_ring_get_one(sock, noblock | recvd, &pbuf) != 0) { + /* When the buffer is empty, it will be returned directly + if in non-blocking mode or if data has already been received */ break; } -- 2.33.0
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.