summaryrefslogtreecommitdiff
path: root/libavformat/network.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-10-21 17:23:35 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-12-13 17:08:03 +0100
commit7439475e69f333541c3647f6b9eb5b5af073cb64 (patch)
tree09eebead96e394bb49dcdcd6fe5199fc5db61dc0 /libavformat/network.c
parent0f02ea0afe969fb5d37a879ef77ceb6d86f6dc4e (diff)
downloadffmpeg-7439475e69f333541c3647f6b9eb5b5af073cb64.tar.gz
avformat/network: check ff_socket_nonblock() return and print a debug message
Fixes CID1026744 Fixes CID1026743 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/network.c')
-rw-r--r--libavformat/network.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libavformat/network.c b/libavformat/network.c
index 2ba435d472..5e2bcf8d15 100644
--- a/libavformat/network.c
+++ b/libavformat/network.c
@@ -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();