commit | 6c7748533a8bd6c0e023b0c5374863518b645387 | [log] [tgz] |
---|---|---|
author | Mike Yu <yumike@google.com> | Fri Oct 25 16:25:29 2019 +0800 |
committer | Mike Yu <yumike@google.com> | Fri Nov 22 11:18:22 2019 +0800 |
tree | 26be49fe4c386d0c4f20c41dcc0f93764e349156 | |
parent | 6ba673b557a3a5b200f1678d2dfb10afd75eca0f [diff] |
Allocate resolv_cache_info with operator new Since there are more and more C++ containers in resolv_cache_info, it's not safe the code keeps using malloc/free for the struct because the destructors don't run when free() is called. Bug: 130686826 Test: cd packages/modules/DnsResolver && atest Change-Id: Ia4bc47a066b0814d62c7dfaf53325ab9ce890332
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.