From d75f03e4b03be4c72c5155cc0b00683da31ae74b Mon Sep 17 00:00:00 2001 From: longtengmcu Date: Thu, 21 May 2020 22:05:38 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E8=A7=A3=E5=86=B3do=5Fpollfd?= =?UTF-8?q?=E5=87=BD=E6=95=B0=E4=B8=AD=E5=A4=84=E7=90=86=E5=BA=95=E5=B1=82?= =?UTF-8?q?=E7=BD=91=E7=BB=9C=E8=AE=BE=E5=A4=87=E8=BF=94=E5=9B=9E=E9=94=99?= =?UTF-8?q?=E8=AF=AF-1=E7=9A=84=E6=83=85=E5=86=B5=EF=BC=8C=E8=BF=94?= =?UTF-8?q?=E5=9B=9E-1=E6=97=B6select=E5=87=BD=E6=95=B0=E4=B9=9F=E8=A6=81?= =?UTF-8?q?=E8=BF=94=E5=9B=9E-1=20=E2=80=A6=202=E3=80=81=E7=BD=91=E5=8D=A1?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E8=B0=83=E7=94=A8=E5=85=B3=E9=97=ADdhcp?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E5=BA=95=E5=B1=82=E8=A6=81=E8=B0=83=E7=94=A8?= =?UTF-8?q?dhcp=5Fstop=E5=87=BD=E6=95=B0=E6=9D=A5=E5=85=B3=E9=97=ADdhcp?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=EF=BC=8C=E6=89=93=E5=BC=80=E6=97=B6=E5=86=8D?= =?UTF-8?q?=E8=B0=83=E7=94=A8dhcp=5Fstart=EF=BC=8C=E5=90=A6=E5=88=99?= =?UTF-8?q?=E5=86=8D=E6=AC=A1=E6=89=93=E5=BC=80dhcp=E6=97=B6=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E8=8E=B7=E5=8F=96ip=E5=9C=B0=E5=9D=80=E6=88=96?= =?UTF-8?q?=E8=80=85=E5=87=BA=E7=8E=B0=E5=9C=A8=E4=BD=BF=E7=94=A8=E9=9D=99?= =?UTF-8?q?=E6=80=81ip=E5=9C=B0=E5=9D=80=E4=BC=9A=E5=9C=A8dhcp=E7=A7=9F?= =?UTF-8?q?=E7=BA=A6=E5=88=B0=E6=9C=9F=E6=97=B6=E8=87=AA=E5=8A=A8=E5=86=8D?= =?UTF-8?q?=E8=8E=B7=E5=8F=96ip=E5=9C=B0=E5=9D=80=E3=80=82=203=E3=80=81sal?= =?UTF-8?q?=5Fsocket.c=E7=A8=8B=E5=BA=8F=E4=B8=AD=E7=9A=84sal=5Faccept?= =?UTF-8?q?=E5=87=BD=E6=95=B0=E5=A2=9E=E5=8A=A0=E5=88=A4=E6=96=AD=E7=BD=91?= =?UTF-8?q?=E5=8D=A1up,down=E7=9A=84=E5=8A=9F=E8=83=BD=204=E3=80=81?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B3=A8=E9=87=8A=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/dfs/src/poll.c | 4 ++-- .../net/lwip-2.0.2/src/netif/ethernetif.c | 18 +++++++++--------- components/net/sal_socket/src/sal_socket.c | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/components/dfs/src/poll.c b/components/dfs/src/poll.c index 3996fdf580..fc48eca758 100644 --- a/components/dfs/src/poll.c +++ b/components/dfs/src/poll.c @@ -138,7 +138,7 @@ static int do_pollfd(struct pollfd *pollfd, rt_pollreq_t *req) mask = f->fops->poll(f, req); - /* dealwith the device return error -1 zhaoshimin 20200509*/ + /* dealwith the device return error -1*/ if (mask < 0) { fd_put(f); @@ -180,7 +180,7 @@ static int poll_do(struct pollfd *fds, nfds_t nfds, struct rt_poll_table *pt, in ret = do_pollfd(pf, &pt->req); if(ret < 0) { - /*dealwith the device return error -1 zhaoshimin 20200509*/ + /*dealwith the device return error -1 */ pt->req._proc = RT_NULL; return ret; } diff --git a/components/net/lwip-2.0.2/src/netif/ethernetif.c b/components/net/lwip-2.0.2/src/netif/ethernetif.c index 8e90f0daf3..be16da7ad3 100644 --- a/components/net/lwip-2.0.2/src/netif/ethernetif.c +++ b/components/net/lwip-2.0.2/src/netif/ethernetif.c @@ -165,15 +165,15 @@ static int lwip_netdev_set_dhcp(struct netdev *netif, rt_bool_t is_enabled) { netdev_low_level_set_dhcp_status(netif, is_enabled); - /*zhaoshimin 20200508 add dhcp start or stop must call dhcp_start and dhcp_stop function*/ - if(is_enabled == RT_TRUE) - { - dhcp_start((struct netif *)netif->user_data); - } - else - { - dhcp_stop((struct netif *)netif->user_data); - } + /*add dhcp start or stop must call dhcp_start and dhcp_stop function*/ + if(is_enabled == RT_TRUE) + { + dhcp_start((struct netif *)netif->user_data); + } + else + { + dhcp_stop((struct netif *)netif->user_data); + } return ERR_OK; } #endif /* RT_LWIP_DHCP */ diff --git a/components/net/sal_socket/src/sal_socket.c b/components/net/sal_socket/src/sal_socket.c index 1e43896012..ec0519df02 100644 --- a/components/net/sal_socket/src/sal_socket.c +++ b/components/net/sal_socket/src/sal_socket.c @@ -564,7 +564,7 @@ int sal_accept(int socket, struct sockaddr *addr, socklen_t *addrlen) /* get the socket object by socket descriptor */ SAL_SOCKET_OBJ_GET(sock, socket); - /* check the network interface is up status zhaoshimin add 20200509*/ + /* check the network interface is up status */ SAL_NETDEV_IS_UP(sock->netdev); /* check the network interface socket operations */