Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
3ad1a7bf
Commit
3ad1a7bf
authored
Sep 08, 2006
by
Rémi Denis-Courmont
Browse files
Partial cleanup and improved Windows error messages
parent
b331a744
Changes
1
Show whitespace changes
Inline
Side-by-side
src/network/io.c
View file @
3ad1a7bf
...
...
@@ -59,13 +59,11 @@ int net_Socket( vlc_object_t *p_this, int i_family, int i_socktype,
{
#if defined(WIN32) || defined(UNDER_CE)
if
(
WSAGetLastError
(
)
!=
WSAEAFNOSUPPORT
)
msg_Warn
(
p_this
,
"cannot create socket (%i)"
,
WSAGetLastError
()
);
#else
if
(
errno
!=
EAFNOSUPPORT
)
msg_Warn
(
p_this
,
"cannot create socket (%s)"
,
strerror
(
errno
)
);
#endif
msg_Warn
(
p_this
,
"cannot create socket: %s"
,
net_strerror
(
net_errno
)
);
return
-
1
;
}
...
...
@@ -179,11 +177,8 @@ int __net_Read( vlc_object_t *p_this, int fd, v_socket_t *p_vs,
if
(
i_ret
<
0
)
{
#if defined(WIN32) || defined(UNDER_CE)
msg_Err
(
p_this
,
"network select error (%d)"
,
WSAGetLastError
()
);
#else
msg_Err
(
p_this
,
"network select error (%s)"
,
strerror
(
errno
)
);
#endif
msg_Err
(
p_this
,
"network select error (%s)"
,
net_strerror
(
net_errno
)
);
return
i_total
>
0
?
i_total
:
-
1
;
}
...
...
@@ -208,12 +203,11 @@ int __net_Read( vlc_object_t *p_this, int fd, v_socket_t *p_vs,
i_total
+=
i_data
;
}
else
if
(
WSAGetLastError
()
==
WSAEINTR
)
continue
;
else
msg_Err
(
p_this
,
"recv failed (%i)"
,
WSAGetLastError
()
);
#else
/* EAGAIN only happens with p_vs (TLS) and it's not an error */
if
(
errno
!=
EAGAIN
)
msg_Err
(
p_this
,
"recv failed (%s)"
,
strerror
(
errno
)
);
#endif
msg_Err
(
p_this
,
"recv failed: %s"
,
net_strerror
(
net_errno
)
);
return
i_total
>
0
?
i_total
:
-
1
;
}
else
if
(
i_recv
==
0
)
...
...
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