Fix DNS multiple query hints to perform both IP4 and IP6 tests

pull/12239/head
Tymoteusz Bloch 2020-01-10 17:54:39 +01:00
parent dc6320239b
commit d30dba29ec
2 changed files with 2 additions and 2 deletions

View File

@ -58,7 +58,7 @@ void do_getaddrinfo_async(const char hosts[][DNS_TEST_HOST_LEN], unsigned int op
// Create callback semaphore and data
rtos::Semaphore semaphore;
dns_application_data_multi_ip *data = new dns_application_data_multi_ip[op_count];
SocketAddress hints{{NSAPI_IPv4}, 80};
SocketAddress hints{{NSAPI_UNSPEC}, 80};
unsigned int count = 0;
for (unsigned int i = 0; i < op_count; i++) {

View File

@ -42,7 +42,7 @@ void do_getaddrinfo(const char hosts[][DNS_TEST_HOST_LEN], unsigned int op_count
(*exp_dns_failure) = 0;
(*exp_timeout) = 0;
SocketAddress hints{{NSAPI_IPv4}, 80};
SocketAddress hints{{NSAPI_UNSPEC}, 80};
for (unsigned int i = 0; i < op_count; i++) {
SocketAddress *result;
nsapi_error_t err = NetworkInterface::get_default_instance()->get_default_instance()->getaddrinfo(hosts[i], &hints, &result);