【修改】修复 inet 转换出错的问题
This commit is contained in:
parent
1931d08933
commit
40b821582e
@ -1505,7 +1505,7 @@ static int ec20_netdev_set_dns_server(struct netdev *netdev, uint8_t dns_num, ip
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* send "AT+QIDNSCFG=<pri_dns>[,<sec_dns>]" commond to set dns servers */
|
/* send "AT+QIDNSCFG=<pri_dns>[,<sec_dns>]" commond to set dns servers */
|
||||||
if (at_exec_cmd(resp, "AT+QIDNSCFG=1,\"%s\"", inet_ntoa(dns_server)) < 0)
|
if (at_exec_cmd(resp, "AT+QIDNSCFG=1,\"%s\"", inet_ntoa(*dns_server)) < 0)
|
||||||
{
|
{
|
||||||
result = -RT_ERROR;
|
result = -RT_ERROR;
|
||||||
goto __exit;
|
goto __exit;
|
||||||
|
@ -1065,7 +1065,7 @@ static int m26_netdev_set_dns_server(struct netdev *netdev, uint8_t dns_num, ip_
|
|||||||
rt_mutex_take(at_event_lock, RT_WAITING_FOREVER);
|
rt_mutex_take(at_event_lock, RT_WAITING_FOREVER);
|
||||||
|
|
||||||
/* send "AT+QIDNSCFG=<pri_dns>[,<sec_dns>]" commond to set dns servers */
|
/* send "AT+QIDNSCFG=<pri_dns>[,<sec_dns>]" commond to set dns servers */
|
||||||
if (at_exec_cmd(resp, "AT+QIDNSCFG=\"%s\"", inet_ntoa(dns_server)) < 0)
|
if (at_exec_cmd(resp, "AT+QIDNSCFG=\"%s\"", inet_ntoa(*dns_server)) < 0)
|
||||||
{
|
{
|
||||||
result = -RT_ERROR;
|
result = -RT_ERROR;
|
||||||
goto __exit;
|
goto __exit;
|
||||||
|
@ -1088,7 +1088,7 @@ static int sim800c_netdev_set_dns_server(struct netdev *netdev, uint8_t dns_num,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* send "AT+CDNSCFG=<pri_dns>[,<sec_dns>]" commond to set dns servers */
|
/* send "AT+CDNSCFG=<pri_dns>[,<sec_dns>]" commond to set dns servers */
|
||||||
if (at_exec_cmd(resp, "AT+CDNSCFG=\"%s\"", inet_ntoa(dns_server)) < 0)
|
if (at_exec_cmd(resp, "AT+CDNSCFG=\"%s\"", inet_ntoa(*dns_server)) < 0)
|
||||||
{
|
{
|
||||||
result = -RT_ERROR;
|
result = -RT_ERROR;
|
||||||
goto __exit;
|
goto __exit;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user