commit | e48f7b54a5028bb97f6b7db180de79c175be8ca2 | [log] [tgz] |
---|---|---|
author | Mike Yu <yumike@google.com> | Mon Feb 10 14:55:06 2020 +0800 |
committer | Mike Yu <yumike@google.com> | Thu Feb 20 17:30:39 2020 +0800 |
tree | 7a9051160281996df7c4045e41b49fa59ef92229 | |
parent | 157918340099d6de0c9c063e0bee6b8036143490 [diff] |
Refactor ResState to store nameserver addresses by IPSockAddr IPSockAddr is more safer and convenient to store socket addresses, to compare two socket addresses, and to make the code more readable. The change also removes get_nsaddr(), a static function in res_send.cpp. Bug: 137169582 Test: cd packages/modules/DnsResolver && atest Change-Id: I694c293139b01a39c40cc50ba8c4f067a2ac4b07
This code uses LOG(X) for logging. Log levels are VERBOSE,DEBUG,INFO,WARNING and ERROR. The default setting is WARNING and logs relate to WARNING and ERROR will be shown. If you want to enable the DEBUG level logs, using following command. adb shell service call dnsresolver 10 i32 1 VERBOSE 0 DEBUG 1 INFO 2 WARNING 3 ERROR 4 Verbose resolver logs could contain PII -- do NOT enable in production builds.