net: getaddrinfo: Fix timeout data type
Convert to use k_timeout_t Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
parent
00a8406d7f
commit
66d394d97a
2 changed files with 7 additions and 7 deletions
|
@ -216,8 +216,8 @@ int z_impl_z_zsock_getaddrinfo_internal(const char *host, const char *service,
|
||||||
* we do not need to start to cancel any pending DNS queries.
|
* we do not need to start to cancel any pending DNS queries.
|
||||||
*/
|
*/
|
||||||
int ret = k_sem_take(&ai_state.sem,
|
int ret = k_sem_take(&ai_state.sem,
|
||||||
CONFIG_NET_SOCKETS_DNS_TIMEOUT +
|
K_MSEC(CONFIG_NET_SOCKETS_DNS_TIMEOUT +
|
||||||
K_MSEC(100));
|
100));
|
||||||
if (ret == -EAGAIN) {
|
if (ret == -EAGAIN) {
|
||||||
return DNS_EAI_AGAIN;
|
return DNS_EAI_AGAIN;
|
||||||
}
|
}
|
||||||
|
@ -243,9 +243,9 @@ int z_impl_z_zsock_getaddrinfo_internal(const char *host, const char *service,
|
||||||
if (family == AF_UNSPEC && IS_ENABLED(CONFIG_NET_IPV6)) {
|
if (family == AF_UNSPEC && IS_ENABLED(CONFIG_NET_IPV6)) {
|
||||||
ret = exec_query(host, AF_INET6, &ai_state);
|
ret = exec_query(host, AF_INET6, &ai_state);
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
int ret = k_sem_take(&ai_state.sem,
|
int ret = k_sem_take(
|
||||||
CONFIG_NET_SOCKETS_DNS_TIMEOUT +
|
&ai_state.sem,
|
||||||
K_MSEC(100));
|
K_MSEC(CONFIG_NET_SOCKETS_DNS_TIMEOUT + 100));
|
||||||
if (ret == -EAGAIN) {
|
if (ret == -EAGAIN) {
|
||||||
return DNS_EAI_AGAIN;
|
return DNS_EAI_AGAIN;
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ LOG_MODULE_REGISTER(net_test, CONFIG_NET_SOCKETS_LOG_LEVEL);
|
||||||
#define MAX_BUF_SIZE 128
|
#define MAX_BUF_SIZE 128
|
||||||
#define STACK_SIZE (1024 + CONFIG_TEST_EXTRA_STACKSIZE)
|
#define STACK_SIZE (1024 + CONFIG_TEST_EXTRA_STACKSIZE)
|
||||||
#define THREAD_PRIORITY K_PRIO_COOP(8)
|
#define THREAD_PRIORITY K_PRIO_COOP(8)
|
||||||
#define WAIT_TIME 250
|
#define WAIT_TIME K_MSEC(250)
|
||||||
|
|
||||||
static u8_t recv_buf[MAX_BUF_SIZE];
|
static u8_t recv_buf[MAX_BUF_SIZE];
|
||||||
|
|
||||||
|
@ -165,7 +165,7 @@ static int process_dns(void)
|
||||||
|
|
||||||
K_THREAD_DEFINE(dns_server_thread_id, STACK_SIZE,
|
K_THREAD_DEFINE(dns_server_thread_id, STACK_SIZE,
|
||||||
process_dns, NULL, NULL, NULL,
|
process_dns, NULL, NULL, NULL,
|
||||||
THREAD_PRIORITY, 0, K_FOREVER);
|
THREAD_PRIORITY, 0, -1);
|
||||||
|
|
||||||
void test_getaddrinfo_setup(void)
|
void test_getaddrinfo_setup(void)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue