Merge "Revert most of "Cleanup: Delete dead code."" into lmp-dev
This commit is contained in:
commit
7a5f0952a2
@ -61,6 +61,9 @@ int android_getaddrinfofornet(const char *, const char *, const struct addrinfo
|
||||
extern void _resolv_set_nameservers_for_net(unsigned netid,
|
||||
const char** servers, int numservers, const char *domains) __used_in_netd;
|
||||
|
||||
/* flush the cache associated with a certain network */
|
||||
extern void _resolv_flush_cache_for_net(unsigned netid) __used_in_netd;
|
||||
|
||||
/* delete the cache associated with a certain network */
|
||||
extern void _resolv_delete_cache_for_net(unsigned netid) __used_in_netd;
|
||||
|
||||
|
@ -1831,6 +1831,17 @@ _get_res_cache_for_net_locked(unsigned netid)
|
||||
return cache;
|
||||
}
|
||||
|
||||
void
|
||||
_resolv_flush_cache_for_net(unsigned netid)
|
||||
{
|
||||
pthread_once(&_res_cache_once, _res_cache_init);
|
||||
pthread_mutex_lock(&_res_cache_list_lock);
|
||||
|
||||
_flush_cache_for_net_locked(netid);
|
||||
|
||||
pthread_mutex_unlock(&_res_cache_list_lock);
|
||||
}
|
||||
|
||||
static void
|
||||
_flush_cache_for_net_locked(unsigned netid)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user