diff options
author | Mike Lockwood <lockwood@android.com> | 2009-05-28 10:19:17 -0400 |
---|---|---|
committer | Mike Lockwood <lockwood@android.com> | 2009-05-28 10:19:17 -0400 |
commit | b63989adf60002945f688104c850bb3fe788dd6d (patch) | |
tree | 5eea892bec041e458867d3af5520f5359163883f /luni | |
parent | 4a18dac1dae17aefb889a458497f3b9a5a6a64ef (diff) | |
download | libcore-b63989adf60002945f688104c850bb3fe788dd6d.zip libcore-b63989adf60002945f688104c850bb3fe788dd6d.tar.gz libcore-b63989adf60002945f688104c850bb3fe788dd6d.tar.bz2 |
InetAddress: Stop logging DNS lookups to logcat.
Logging all DNS lookups system wide raises privacy concerns to me
and might make people less likely to include logs in their bug reports.
Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'luni')
-rw-r--r-- | luni/src/main/native/java_net_InetAddress.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/luni/src/main/native/java_net_InetAddress.cpp b/luni/src/main/native/java_net_InetAddress.cpp index 0eb2753..c0666d5 100644 --- a/luni/src/main/native/java_net_InetAddress.cpp +++ b/luni/src/main/native/java_net_InetAddress.cpp @@ -16,6 +16,8 @@ #define LOG_TAG "InetAddress" +#define LOG_DNS 0 + #include "JNIHelp.h" #include "utils/Log.h" #include "jni.h" @@ -59,6 +61,7 @@ static void throwNullPointerException(JNIEnv* env) } } +#if LOG_DNS static void logIpString(struct addrinfo* ai, const char* name) { char ipString[INET6_ADDRSTRLEN]; @@ -71,6 +74,11 @@ static void logIpString(struct addrinfo* ai, const char* name) LOGE("%s: getnameinfo: %s", name, gai_strerror(result)); } } +#else +static inline void logIpString(struct addrinfo* ai, const char* name) +{ +} +#endif static jobjectArray getAllByNameUsingAdb(JNIEnv* env, const char* name) { |