summaryrefslogtreecommitdiff
path: root/libavformat/os_support.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2012-06-25 12:44:18 +0300
committerMartin Storsjö <martin@martin.st>2012-07-15 21:21:59 +0300
commit2ca6e9bb47f0f58f0cb4a840b301edf45e77f0e5 (patch)
tree8c759b184a2b3268bb2562948ff8f749321bc1a3 /libavformat/os_support.c
parentb4675d0fbf6606ab737e81c3c0fe6a05c8764334 (diff)
network: Extend the fallback gai_strerror implementation to handle more error codes
This is useful if a proper getaddrinfo is loaded dynamically on windows, while using the fallback implementation of gai_strerror. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/os_support.c')
-rw-r--r--libavformat/os_support.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavformat/os_support.c b/libavformat/os_support.c
index 6d8c8ac6a3..76204e0546 100644
--- a/libavformat/os_support.c
+++ b/libavformat/os_support.c
@@ -243,9 +243,17 @@ int ff_getnameinfo(const struct sockaddr *sa, int salen,
const char *ff_gai_strerror(int ecode)
{
switch(ecode) {
+ case EAI_AGAIN : return "Temporary failure in name resolution";
+ case EAI_BADFLAGS: return "Invalid flags for ai_flags";
case EAI_FAIL : return "A non-recoverable error occurred";
case EAI_FAMILY : return "The address family was not recognized or the address length was invalid for the specified family";
+ case EAI_MEMORY : return "Memory allocation failure";
+#if EAI_NODATA != EAI_NONAME
+ case EAI_NODATA : return "No address associated with hostname";
+#endif
case EAI_NONAME : return "The name does not resolve for the supplied parameters";
+ case EAI_SERVICE: return "servname not supported for ai_socktype";
+ case EAI_SOCKTYPE: return "ai_socktype not supported";
}
return "Unknown error";