ares_getnameinfo: Partially revert commit 85520d66e0ac7ac73411bc25e98769a88b2f
authorYang Tse <yangsita@gmail.com>
Tue, 16 Nov 2010 19:15:55 +0000 (20:15 +0100)
committerYang Tse <yangsita@gmail.com>
Tue, 16 Nov 2010 19:15:55 +0000 (20:15 +0100)
Upon socket address family and length validation failure return ARES_ENOTIMP
in callback again, this is the error code documented in man page and used
mostly all over the library.

ares_getnameinfo.c

index e5b5d9f..b623686 100644 (file)
@@ -114,7 +114,7 @@ void ares_getnameinfo(ares_channel channel, const struct sockaddr *sa,
     }
   else
     {
     }
   else
     {
-      callback(arg, ARES_EBADFAMILY, 0, NULL, NULL);
+      callback(arg, ARES_ENOTIMP, 0, NULL, NULL);
       return;
     }
 
       return;
     }