Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8c0171d2 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Make change and version bump to r_aml_300900300 for mainline module file: apex/manifest.json

Change-Id: Ia45bb379a3716e85ac7716ad86c6792e331bf0d2
parents a64ab31c 2f819aee
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -146,8 +146,6 @@ DnsTlsTransport::Response DnsTlsDispatcher::query(const std::list<DnsTlsServer>&
DnsTlsTransport::Response DnsTlsDispatcher::query(const DnsTlsServer& server, unsigned mark,
                                                  const Slice query, const Slice ans, int* resplen,
                                                  bool* connectTriggered) {
    int connectCounter;

    // TODO: This can cause the resolver to create multiple connections to the same DoT server
    // merely due to different mark, such as the bit explicitlySelected unset.
    // See if we can save them and just create one connection for one DoT server.
@@ -163,13 +161,19 @@ DnsTlsTransport::Response DnsTlsDispatcher::query(const DnsTlsServer& server, un
            xport = it->second.get();
        }
        ++xport->useCount;
        connectCounter = xport->transport.getConnectCounter();
    }

    // Don't call this function and hold sLock at the same time because of the following reason:
    // TLS handshake requires a lock which is also needed by this function, if the handshake gets
    // stuck, this function also gets blocked.
    const int connectCounter = xport->transport.getConnectCounter();

    LOG(DEBUG) << "Sending query of length " << query.size();
    auto res = xport->transport.query(query);
    LOG(DEBUG) << "Awaiting response";
    const auto& result = res.get();
    *connectTriggered = (xport->transport.getConnectCounter() > connectCounter);

    DnsTlsTransport::Response code = result.code;
    if (code == DnsTlsTransport::Response::success) {
        if (result.response.size() > ans.size()) {
@@ -187,7 +191,6 @@ DnsTlsTransport::Response DnsTlsDispatcher::query(const DnsTlsServer& server, un
    auto now = std::chrono::steady_clock::now();
    {
        std::lock_guard guard(sLock);
        *connectTriggered = (xport->transport.getConnectCounter() > connectCounter);
        --xport->useCount;
        xport->lastUsed = now;
        cleanup(now);
+1 −1
Original line number Diff line number Diff line
{
  "name": "com.android.resolv",
  "version": 300900200
  "version": 300900300
}