OSDN Git Service

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 01:07:24 +0000 (10:07 +0900)
commitfff356786f8a3a98c5c29f12bb7e59e6d98076a9
tree809df27c4f19294876b13a9b2583fdddc8e4b79d
parentbd26f23c84c6c3a1179a9bf9cca4b5e2941bf042
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
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