Cleanup: Delete dead code.

Bug: 15413389
Change-Id: I315468832ef18ffc84174e54774ab63b86d284dc
This commit is contained in:
Sreeram Ramachandran 2014-07-20 14:10:45 -07:00
parent 6209c81d40
commit 2582f02a01
3 changed files with 3 additions and 17 deletions

View File

@ -565,7 +565,7 @@ android_read_hostent(FILE* proxy)
char buf[4];
if (fread(buf, 1, sizeof(buf), proxy) != sizeof(buf)) return NULL;
/* This is reading serialized data from system/netd/DnsProxyListener.cpp
/* This is reading serialized data from system/netd/server/DnsProxyListener.cpp
* and changes here need to be matched there */
int result_code = strtol(buf, NULL, 10);
if (result_code != DnsProxyQueryResult) {
@ -763,7 +763,7 @@ gethostbyname_internal(const char *name, int af, res_state res, unsigned netid,
netid = __netdClientDispatch.netIdForResolv(netid);
/* This is writing to system/netd/DnsProxyListener.cpp and changes
/* This is writing to system/netd/server/DnsProxyListener.cpp and changes
* here need to be matched there */
if (fprintf(proxy, "gethostbyname %u %s %d",
netid,

View File

@ -36,7 +36,7 @@
#include <netinet/in.h>
/*
* Passing NETID_UNSET as the netId causes system/netd/DnsProxyListener.cpp to
* Passing NETID_UNSET as the netId causes system/netd/server/DnsProxyListener.cpp to
* fill in the appropriate default netId for the query.
*/
#define NETID_UNSET 0u
@ -61,9 +61,6 @@ 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;

View File

@ -1831,17 +1831,6 @@ _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)
{