From 40b821582e9c51221f31168411a0d185156f1517 Mon Sep 17 00:00:00 2001 From: zylx Date: Fri, 26 Apr 2019 14:39:27 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=20inet=20=E8=BD=AC=E6=8D=A2=E5=87=BA=E9=94=99?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- at_socket_ec20.c | 2 +- at_socket_m26.c | 2 +- at_socket_sim800c.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/at_socket_ec20.c b/at_socket_ec20.c index 4d7adef..c62c31a 100644 --- a/at_socket_ec20.c +++ b/at_socket_ec20.c @@ -1505,7 +1505,7 @@ static int ec20_netdev_set_dns_server(struct netdev *netdev, uint8_t dns_num, ip } /* send "AT+QIDNSCFG=[,]" 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; diff --git a/at_socket_m26.c b/at_socket_m26.c index a0cf523..6ae90e8 100644 --- a/at_socket_m26.c +++ b/at_socket_m26.c @@ -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=[,]" 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; diff --git a/at_socket_sim800c.c b/at_socket_sim800c.c index 100b632..294e9b7 100644 --- a/at_socket_sim800c.c +++ b/at_socket_sim800c.c @@ -1088,7 +1088,7 @@ static int sim800c_netdev_set_dns_server(struct netdev *netdev, uint8_t dns_num, } /* send "AT+CDNSCFG=[,]" 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;