mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-12-26 01:07:21 +00:00
1、解决do_pollfd函数中处理底层网络设备返回错误-1的情况,返回-1时select函数也要返回-1 …
2、网卡设备调用关闭dhcp时,底层要调用dhcp_stop函数来关闭dhcp功能,打开时再调用dhcp_start,否则再次打开dhcp时无法获取ip地址或者出现在使用静态ip地址会在dhcp租约到期时自动再获取ip地址。 3、sal_socket.c程序中的sal_accept函数增加判断网卡up,down的功能 4、修改注释信息
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user