Cleanup: Delete dead code.
Bug: 15413389 Change-Id: I315468832ef18ffc84174e54774ab63b86d284dc
This commit is contained in:
parent
6209c81d40
commit
2582f02a01
@ -565,7 +565,7 @@ android_read_hostent(FILE* proxy)
|
|||||||
char buf[4];
|
char buf[4];
|
||||||
if (fread(buf, 1, sizeof(buf), proxy) != sizeof(buf)) return NULL;
|
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 */
|
* and changes here need to be matched there */
|
||||||
int result_code = strtol(buf, NULL, 10);
|
int result_code = strtol(buf, NULL, 10);
|
||||||
if (result_code != DnsProxyQueryResult) {
|
if (result_code != DnsProxyQueryResult) {
|
||||||
@ -763,7 +763,7 @@ gethostbyname_internal(const char *name, int af, res_state res, unsigned netid,
|
|||||||
|
|
||||||
netid = __netdClientDispatch.netIdForResolv(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 */
|
* here need to be matched there */
|
||||||
if (fprintf(proxy, "gethostbyname %u %s %d",
|
if (fprintf(proxy, "gethostbyname %u %s %d",
|
||||||
netid,
|
netid,
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
#include <netinet/in.h>
|
#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.
|
* fill in the appropriate default netId for the query.
|
||||||
*/
|
*/
|
||||||
#define NETID_UNSET 0u
|
#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,
|
extern void _resolv_set_nameservers_for_net(unsigned netid,
|
||||||
const char** servers, int numservers, const char *domains) __used_in_netd;
|
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 */
|
/* delete the cache associated with a certain network */
|
||||||
extern void _resolv_delete_cache_for_net(unsigned netid) __used_in_netd;
|
extern void _resolv_delete_cache_for_net(unsigned netid) __used_in_netd;
|
||||||
|
|
||||||
|
@ -1831,17 +1831,6 @@ _get_res_cache_for_net_locked(unsigned netid)
|
|||||||
return cache;
|
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
|
static void
|
||||||
_flush_cache_for_net_locked(unsigned netid)
|
_flush_cache_for_net_locked(unsigned netid)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user