platform_bionic/libc/dns/resolv
Elliott Hughes d0bbfa8327 Make res_init() work again.
Change 75830fb836 to fix _nres
initialization to be thread safe accidentally introduced a behavior
change whereby res_init() became a no-op. It also failed to remove all
direct accesses to _nres.

Move the file over to C++ so we can let RAII ensure we're always holding
a lock while using the global state, make all callers access the global
state via this class, and restore the previous behavior of res_init().

Test: atest DnsResolverTest
Bug: 166235340
Change-Id: Ib390a7eac063bc0ff5eeba755e8c74ef1383004e
2021-04-08 12:04:05 -07:00
..
herror.c Moved nameser.h and namser_compat.h to public include dir 2014-03-04 15:07:07 +00:00
res_cache.c Free memory when it is no more used 2018-11-08 19:56:00 -08:00
res_comp.c Moved nameser.h and namser_compat.h to public include dir 2014-03-04 15:07:07 +00:00
res_data.cpp Make res_init() work again. 2021-04-08 12:04:05 -07:00
res_debug.c Make res_init() work again. 2021-04-08 12:04:05 -07:00
res_debug.h Renamed the misleading libc/netbsd directory to libc/dns. 2014-02-28 16:31:04 +00:00
res_init.c Enable EDNS and the DO-bit if the netcontext asks 2018-03-21 07:57:14 -07:00
res_mkquery.c Pad queries when EDNS0 is enabled. 2018-04-02 15:31:30 -07:00
res_private.h Renamed the misleading libc/netbsd directory to libc/dns. 2014-02-28 16:31:04 +00:00
res_query.c Replace uses of sprintf(3) with snprintf(3). 2014-10-08 16:12:27 -07:00
res_send.c Fix OOB read in DNS resolver am: 43264bc365 2020-08-30 04:49:07 +00:00
res_state.c Make res_init() work again. 2021-04-08 12:04:05 -07:00
res_stats.c Move libc_log code into libasync_safe. 2017-05-03 08:50:43 -07:00