Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
0912334f
Commit
0912334f
authored
May 17, 2017
by
Paul Sokolovsky
Browse files
zephyr/modusocket: getaddrinfo: Use RAISE_ERRNO for proper error decoding.
parent
5f648ff6
Changes
1
Hide whitespace changes
Inline
Side-by-side
zephyr/modusocket.c
View file @
0912334f
...
...
@@ -572,10 +572,7 @@ STATIC mp_obj_t mod_getaddrinfo(size_t n_args, const mp_obj_t *args) {
int
status
;
for
(
int
i
=
2
;
i
--
;)
{
int
type
=
(
family
!=
AF_INET6
?
DNS_QUERY_TYPE_A
:
DNS_QUERY_TYPE_AAAA
);
status
=
dns_get_addr_info
(
host
,
type
,
NULL
,
dns_resolve_cb
,
&
state
,
3000
);
if
(
status
<
0
)
{
mp_raise_OSError
(
status
);
}
RAISE_ERRNO
(
dns_get_addr_info
(
host
,
type
,
NULL
,
dns_resolve_cb
,
&
state
,
3000
));
k_sem_take
(
&
state
.
sem
,
K_FOREVER
);
if
(
family
!=
0
)
{
break
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment