Unify DNS error codes reporting to the metrics
gethostbyname and getaddrinfo have their own error codes. Unify
these error codes to be POSIX EAI_*. This change is for better
and even more detailed DNS metrics, and will not impact on
applications.
Also clean up no-op code:
- res_put_state
Bug: 113916551
Test: system/netd/tests/runtests.sh passed
Change-Id: Id4bbabc8d4dd5f2fdc8fabd38dab753cbb07d691
diff --git a/resolv/include/netd_resolv/resolv.h b/resolv/include/netd_resolv/resolv.h
index 96133e5..2c33c71 100644
--- a/resolv/include/netd_resolv/resolv.h
+++ b/resolv/include/netd_resolv/resolv.h
@@ -85,8 +85,8 @@
LIBNETD_RESOLV_PUBLIC hostent* android_gethostbyaddrfornetcontext(const void*, socklen_t, int,
const android_net_context*);
-LIBNETD_RESOLV_PUBLIC hostent* android_gethostbynamefornetcontext(const char*, int,
- const android_net_context*);
+LIBNETD_RESOLV_PUBLIC int android_gethostbynamefornetcontext(const char*, int,
+ const android_net_context*, hostent**);
LIBNETD_RESOLV_PUBLIC int android_getaddrinfofornetcontext(const char*, const char*,
const addrinfo*,
const android_net_context*, addrinfo**);