summaryrefslogtreecommitdiff
path: root/libavformat/network.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-08-06 17:53:01 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-08-06 17:53:01 +0200
commit89efaabc9949dcdc49126881beaa38355b8f9a44 (patch)
tree61bc2709d50bc13b2670323656d20bab79e6ee16 /libavformat/network.c
parent287f7d0ae1267bf5e505d4173f5a4cb77f433c66 (diff)
parentabe5268c3328bf0e8fcfb7dc6e231b8920177c3a (diff)
Merge commit 'abe5268c3328bf0e8fcfb7dc6e231b8920177c3a'
* commit 'abe5268c3328bf0e8fcfb7dc6e231b8920177c3a': tcp: Use a different log message and level if there's more addresses to try Conflicts: libavformat/tcp.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/network.c')
-rw-r--r--libavformat/network.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/libavformat/network.c b/libavformat/network.c
index 1cd83b80c5..a41b0511e4 100644
--- a/libavformat/network.c
+++ b/libavformat/network.c
@@ -267,7 +267,8 @@ int ff_listen_bind(int fd, const struct sockaddr *addr,
}
int ff_listen_connect(int fd, const struct sockaddr *addr,
- socklen_t addrlen, int timeout, URLContext *h)
+ socklen_t addrlen, int timeout, URLContext *h,
+ int will_try_next)
{
struct pollfd p = {fd, POLLOUT, 0};
int ret;
@@ -294,9 +295,13 @@ int ff_listen_connect(int fd, const struct sockaddr *addr,
char errbuf[100];
ret = AVERROR(ret);
av_strerror(ret, errbuf, sizeof(errbuf));
- av_log(h, AV_LOG_ERROR,
- "Connection to %s failed: %s\n",
- h->filename, errbuf);
+ if (will_try_next)
+ av_log(h, AV_LOG_WARNING,
+ "Connection to %s failed (%s), trying next address\n",
+ h->filename, errbuf);
+ else
+ av_log(h, AV_LOG_ERROR, "Connection to %s failed: %s\n",
+ h->filename, errbuf);
}
default:
return ret;