代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/gazelle 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 887130c90c7875b4c0860ed0667224418e690752 Mon Sep 17 00:00:00 2001
From: jinag12 <jiangheng14@huawei.com>
Date: Thu, 21 Dec 2023 09:03:02 +0000
Subject: [PATCH] fix gazellectl -c msg error
Signed-off-by: jinag12 <jiangheng14@huawei.com>
---
src/lstack/core/lstack_lwip.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/lstack/core/lstack_lwip.c b/src/lstack/core/lstack_lwip.c
index 15f99f9..1913d03 100644
--- a/src/lstack/core/lstack_lwip.c
+++ b/src/lstack/core/lstack_lwip.c
@@ -1158,15 +1158,14 @@ static void copy_pcb_to_conn(struct gazelle_stat_lstack_conn_info *conn, const s
conn->keep_intvl = pcb->keep_intvl;
conn->keep_cnt = pcb->keep_cnt;
- if (netconn != NULL && netconn->recvmbox != NULL) {
- conn->recv_cnt = rte_ring_count(netconn->recvmbox->ring);
+ if (netconn != NULL) {
conn->fd = netconn->socket;
-
+ conn->recv_cnt = (netconn->recvmbox == NULL) ? 0 : rte_ring_count(netconn->recvmbox->ring);
struct lwip_sock *sock = get_socket(netconn->socket);
- if (netconn->socket > 0 && sock != NULL && sock->recv_ring != NULL && sock->send_ring != NULL) {
- conn->recv_ring_cnt = gazelle_ring_readable_count(sock->recv_ring);
+ if (sock != NULL) {
+ conn->recv_ring_cnt = (sock->recv_ring == NULL) ? 0 : gazelle_ring_readable_count(sock->recv_ring);
conn->recv_ring_cnt += (sock->recv_lastdata) ? 1 : 0;
- conn->send_ring_cnt = gazelle_ring_readover_count(sock->send_ring);
+ conn->send_ring_cnt = (sock->send_ring == NULL) ? 0 : gazelle_ring_readover_count(sock->send_ring);
conn->events = sock->events;
conn->epoll_events = sock->epoll_events;
conn->eventlist = !list_is_null(&sock->event_list);
--
2.27.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。