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

Commit 0f163df8 authored by Ken Chen's avatar Ken Chen
Browse files

Revise rcode in log

Rcode in log should be 255(RCODE_TIMEOUT) rather than 0 in DNS response
timeout case.

Before:
resolv  : retrying_poll: 46 retrying_poll timeout
resolv  : doQuery: rcode=0, ancount=0

After:
resolv  : retrying_poll: 46 retrying_poll timeout
resolv  : doQuery: rcode=255, ancount=0

Bug: N/A
Test: m; adb locat
Change-Id: Ibd1ce9347c10c50a73bba5e2ae859bb402960362
parent 7299cab9
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -1658,7 +1658,7 @@ QueryResult doQuery(const char* name, res_target* t, ResState* res,
        }
        }
    }
    }


    LOG(DEBUG) << __func__ << ": rcode=" << hp->rcode << ", ancount=" << ntohs(hp->ancount);
    LOG(DEBUG) << __func__ << ": rcode=" << rcode << ", ancount=" << ntohs(hp->ancount);


    t->n = n;
    t->n = n;
    return {
    return {
@@ -1780,7 +1780,7 @@ static int res_queryN(const char* name, res_target* target, ResState* res, int*
                retried = true;
                retried = true;
                goto again;
                goto again;
            }
            }
            LOG(DEBUG) << __func__ << ": rcode=" << hp->rcode << ", ancount=" << ntohs(hp->ancount);
            LOG(DEBUG) << __func__ << ": rcode=" << rcode << ", ancount=" << ntohs(hp->ancount);
            continue;
            continue;
        }
        }