【修改】修复 inet 转换出错的问题

This commit is contained in:
zylx 2019-04-26 14:39:27 +08:00
parent 1931d08933
commit 40b821582e
3 changed files with 3 additions and 3 deletions

View File

@ -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 */
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;
goto __exit;

View File

@ -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);
/* 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;
goto __exit;

View File

@ -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 */
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;
goto __exit;