Skip to content
This repository was archived by the owner on Sep 6, 2023. It is now read-only.

Commit 0912334

Browse files
author
Paul Sokolovsky
committed
zephyr/modusocket: getaddrinfo: Use RAISE_ERRNO for proper error decoding.
1 parent 5f648ff commit 0912334

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

zephyr/modusocket.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -572,10 +572,7 @@ STATIC mp_obj_t mod_getaddrinfo(size_t n_args, const mp_obj_t *args) {
572572
int status;
573573
for (int i = 2; i--;) {
574574
int type = (family != AF_INET6 ? DNS_QUERY_TYPE_A : DNS_QUERY_TYPE_AAAA);
575-
status = dns_get_addr_info(host, type, NULL, dns_resolve_cb, &state, 3000);
576-
if (status < 0) {
577-
mp_raise_OSError(status);
578-
}
575+
RAISE_ERRNO(dns_get_addr_info(host, type, NULL, dns_resolve_cb, &state, 3000));
579576
k_sem_take(&state.sem, K_FOREVER);
580577
if (family != 0) {
581578
break;

0 commit comments

Comments
 (0)