OSDN Git Service

DO NOT MERGE Store DNS server count in resolv_cache.
authorPierre Imai <imaipi@google.com>
Mon, 18 Apr 2016 02:42:14 +0000 (11:42 +0900)
committerPierre Imai <imaipi@google.com>
Thu, 21 Apr 2016 05:16:01 +0000 (14:16 +0900)
commit589afca92c2fa026f908ec2c54c0450c438c602c
treebd50921f5b276aed1d9b83e4166fd14c40545144
parent7a0224a66ba726f82c830c41e58ad910c9104f7a
DO NOT MERGE Store DNS server count in resolv_cache.

Instead of keeping a sentinel after nameservers[], nsaddrinfo[] and
nstats[], store the server count in the structure, freeing up memory and
eliminating the need to enumerate the server count every time
_resolv_is_nameservers_equal_locked() is invoked.

Also increase MAXNS from 3 to 4.

BUG: 28153323
Change-Id: I11a7257af695157c9e32019cd00c67b535b63c75
(cherry picked from commit fff356786f8a3a98c5c29f12bb7e59e6d98076a9)
libc/dns/include/resolv_netid.h
libc/dns/include/resolv_params.h
libc/dns/resolv/res_cache.c
libc/dns/resolv/res_send.c
libc/dns/resolv/res_state.c