commit | 429321fa9ca9d26f349f9381883e855f32e488bf | [log] [tgz] |
---|---|---|
author | Matthew Maurer <mmaurer@google.com> | Mon Oct 04 20:37:15 2021 -0700 |
committer | Matthew Maurer <mmaurer@google.com> | Mon Oct 04 20:53:28 2021 -0700 |
tree | 5f4a4b9fa2c12381fc82205735e18839f919b7ad | |
parent | aa0dac6f1b9b2a09bc3c39688521f9dc1ec8ac1f [diff] |
DoH: Lock access to DohDispatcher Previously, we exposed &mut APIs to interacting with DohDispatcher. This is fine, but is not a legal API to use in a multithreaded context without a lock. To support this usage, we wrap it in a Mutex and only require a & reference which can be safely materialized from multiple threads since Mutex is Sync. Bug: 202080500 Change-Id: I7eb8dbaa74202033a8aa89fdedade792070aa483
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.