代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/lwip 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From ed49e784233ec0a83eb4f4e37fe9cd112bfed555 Mon Sep 17 00:00:00 2001
From: hantwofish <[email protected]>
Date: Wed, 10 Jan 2024 09:31:23 +0800
Subject: [PATCH] delete redundant logs in lwip
---
src/api/sockets.c | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/src/api/sockets.c b/src/api/sockets.c
index 15053b3..ce79bb3 100644
--- a/src/api/sockets.c
+++ b/src/api/sockets.c
@@ -447,7 +447,7 @@ tryget_socket_unconn_nouse(int fd)
if ((s < 0) || (s >= NUM_SOCKETS))
#endif /* GAZELLE_ENABLE */
{
- LWIP_DEBUGF(SOCKETS_DEBUG | GAZELLE_DEBUG_SERIOUS, ("tryget_socket_unconn(%d): invalid\n", fd));
+ LWIP_DEBUGF(SOCKETS_DEBUG , ("tryget_socket_unconn(%d): invalid\n", fd));
return NULL;
}
return &sockets[s];
@@ -521,7 +521,7 @@ get_socket(int fd)
struct lwip_sock *sock = tryget_socket(fd);
if (!sock) {
if ((fd < LWIP_SOCKET_OFFSET) || (fd >= (LWIP_SOCKET_OFFSET + NUM_SOCKETS))) {
- LWIP_DEBUGF(SOCKETS_DEBUG | GAZELLE_DEBUG_SERIOUS, ("get_socket(%d): invalid\n", fd));
+ LWIP_DEBUGF(SOCKETS_DEBUG , ("get_socket(%d): invalid\n", fd));
}
set_errno(EBADF);
return NULL;
@@ -588,7 +588,6 @@ alloc_socket(struct netconn *newconn, int accepted, int flags)
SYS_ARCH_PROTECT(lev);
i = posix_api->socket_fn(domain, type, protocol);
if (i == -1) {
- LWIP_DEBUGF(SOCKETS_DEBUG | GAZELLE_DEBUG_SERIOUS, ("posix_api->socket_fn fail socket is -1"));
goto err;
}
@@ -597,7 +596,6 @@ alloc_socket(struct netconn *newconn, int accepted, int flags)
}
if ((i < LWIP_SOCKET_OFFSET) || (i >= sockets_num + LWIP_SOCKET_OFFSET)) {
- LWIP_DEBUGF(SOCKETS_DEBUG | GAZELLE_DEBUG_SERIOUS, ("posix_api->socket_fn socket is %d, illegal\n", i));
goto err;
}
@@ -769,14 +767,13 @@ lwip_accept4(int s, struct sockaddr *addr, socklen_t *addrlen, int flags)
sock = get_socket(s);
if (!sock) {
- LWIP_DEBUGF(SOCKETS_DEBUG | GAZELLE_DEBUG_SERIOUS, ("get_socket sock is null\n"));
return -1;
}
/* wait for a new connection */
err = netconn_accept(sock->conn, &newconn);
if (err != ERR_OK) {
- LWIP_DEBUGF(SOCKETS_DEBUG | GAZELLE_DEBUG_SERIOUS, ("lwip_accept(%d): netconn_acept failed, err=%d\n", s, err));
+ LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_accept(%d): netconn_acept failed, err=%d\n", s, err));
if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) != NETCONN_TCP) {
sock_set_errno(sock, EOPNOTSUPP);
} else if (err == ERR_CLSD) {
@@ -791,7 +788,6 @@ lwip_accept4(int s, struct sockaddr *addr, socklen_t *addrlen, int flags)
newsock = alloc_socket(newconn, 1, flags);
if (newsock == -1) {
- LWIP_DEBUGF(SOCKETS_DEBUG | GAZELLE_DEBUG_SERIOUS, ("alloc_socket fail newsock is -1\n"));
netconn_delete(newconn);
sock_set_errno(sock, ENFILE);
done_socket(sock);
@@ -811,7 +807,6 @@ lwip_accept4(int s, struct sockaddr *addr, socklen_t *addrlen, int flags)
ret = find_same_node_memzone(pcb, nsock);
}
if (pcb == NULL || ret != 0) {
- LWIP_DEBUGF(SOCKETS_DEBUG | GAZELLE_DEBUG_SERIOUS, ("alloc_socket fail pcb null flag=%u, ret=%d \n", (pcb == NULL), ret));
netconn_delete(newconn);
free_socket(nsock, 1);
sock_set_errno(sock, ENOTCONN);
@@ -847,7 +842,7 @@ lwip_accept4(int s, struct sockaddr *addr, socklen_t *addrlen, int flags)
/* get the IP address and port of the remote host */
err = netconn_peer(newconn, &naddr, &port);
if (err != ERR_OK) {
- LWIP_DEBUGF(SOCKETS_DEBUG | GAZELLE_DEBUG_SERIOUS, ("lwip_accept(%d): netconn_peer failed, err=%d\n", s, err));
+ LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_accept(%d): netconn_peer failed, err=%d\n", s, err));
free_socket(nsock, 1);
sock_set_errno(sock, err_to_errno(err));
done_socket(sock);
--
2.33.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。