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

Commit d1e944aa authored by Frank Li's avatar Frank Li Committed by Gerrit Code Review
Browse files

Merge "Fill in DNS query type in DNS metric when DNS lookup hit cache"

parents 14e0a78a e02d01c1
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -418,6 +418,7 @@ int res_nsend(res_state statp, const uint8_t* buf, int buflen, uint8_t* ans, int
        DnsQueryEvent* dnsQueryEvent = addDnsQueryEvent(statp->event);
        DnsQueryEvent* dnsQueryEvent = addDnsQueryEvent(statp->event);
        dnsQueryEvent->set_latency_micros(cacheLatencyUs);
        dnsQueryEvent->set_latency_micros(cacheLatencyUs);
        dnsQueryEvent->set_cache_hit(static_cast<CacheStatus>(cache_status));
        dnsQueryEvent->set_cache_hit(static_cast<CacheStatus>(cache_status));
        dnsQueryEvent->set_type(getQueryType(buf, buflen));
        return anslen;
        return anslen;
    } else if (cache_status != RESOLV_CACHE_UNSUPPORTED) {
    } else if (cache_status != RESOLV_CACHE_UNSUPPORTED) {
        // had a cache miss for a known network, so populate the thread private
        // had a cache miss for a known network, so populate the thread private