avformat/network: check ff_socket_nonblock() return and print a debug message

Fixes CID1026744
Fixes CID1026743

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-10-21 17:23:35 +02:00
parent 0f02ea0afe
commit 7439475e69
1 changed files with 5 additions and 2 deletions

View File

@ -281,7 +281,9 @@ int ff_listen_bind(int fd, const struct sockaddr *addr,
closesocket(fd);
ff_socket_nonblock(ret, 1);
if (ff_socket_nonblock(ret, 1) < 0)
av_log(NULL, AV_LOG_DEBUG, "ff_socket_nonblock failed\n");
return ret;
}
@ -293,7 +295,8 @@ int ff_listen_connect(int fd, const struct sockaddr *addr,
int ret;
socklen_t optlen;
ff_socket_nonblock(fd, 1);
if (ff_socket_nonblock(fd, 1) < 0)
av_log(NULL, AV_LOG_DEBUG, "ff_socket_nonblock failed\n");
while ((ret = connect(fd, addr, addrlen))) {
ret = ff_neterrno();