resolved conflicts for merge of 9363d912 to honeycomb-plus-aosp
Change-Id: Ib0680d7e0be34ae656a9675ddd1014a6193a4006
This commit is contained in:
commit
0cb2d467de
@ -1627,6 +1627,7 @@ __get_res_cache(void)
|
|||||||
while (cache_info) {
|
while (cache_info) {
|
||||||
if (cache_info->ifname[0] != '\0') {
|
if (cache_info->ifname[0] != '\0') {
|
||||||
ifname = cache_info->ifname;
|
ifname = cache_info->ifname;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
cache_info = cache_info->next;
|
cache_info = cache_info->next;
|
||||||
@ -1684,6 +1685,7 @@ _resolv_cache_reset(unsigned generation)
|
|||||||
while (cache_info) {
|
while (cache_info) {
|
||||||
if (cache_info->ifname[0] != '\0') {
|
if (cache_info->ifname[0] != '\0') {
|
||||||
ifname = cache_info->ifname;
|
ifname = cache_info->ifname;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
cache_info = cache_info->next;
|
cache_info = cache_info->next;
|
||||||
@ -1691,18 +1693,15 @@ _resolv_cache_reset(unsigned generation)
|
|||||||
}
|
}
|
||||||
struct resolv_cache* cache = _get_res_cache_for_iface_locked(ifname);
|
struct resolv_cache* cache = _get_res_cache_for_iface_locked(ifname);
|
||||||
|
|
||||||
if (cache == NULL) {
|
if (cache != NULL) {
|
||||||
pthread_mutex_unlock(&_res_cache_list_lock);
|
pthread_mutex_lock( &cache->lock );
|
||||||
return;
|
if (cache->generation != generation) {
|
||||||
|
_cache_flush_locked(cache);
|
||||||
|
cache->generation = generation;
|
||||||
|
}
|
||||||
|
pthread_mutex_unlock( &cache->lock );
|
||||||
}
|
}
|
||||||
|
|
||||||
pthread_mutex_lock( &cache->lock );
|
|
||||||
if (cache->generation != generation) {
|
|
||||||
_cache_flush_locked(cache);
|
|
||||||
cache->generation = generation;
|
|
||||||
}
|
|
||||||
pthread_mutex_unlock( &cache->lock );
|
|
||||||
|
|
||||||
pthread_mutex_unlock(&_res_cache_list_lock);
|
pthread_mutex_unlock(&_res_cache_list_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1860,8 +1859,10 @@ _free_nameservers_locked(struct resolv_cache_info* cache_info)
|
|||||||
for (i = 0; i <= MAXNS; i++) {
|
for (i = 0; i <= MAXNS; i++) {
|
||||||
free(cache_info->nameservers[i]);
|
free(cache_info->nameservers[i]);
|
||||||
cache_info->nameservers[i] = NULL;
|
cache_info->nameservers[i] = NULL;
|
||||||
freeaddrinfo(cache_info->nsaddrinfo[i]);
|
if (cache_info->nsaddrinfo[i] != NULL) {
|
||||||
cache_info->nsaddrinfo[i] = NULL;
|
freeaddrinfo(cache_info->nsaddrinfo[i]);
|
||||||
|
cache_info->nsaddrinfo[i] = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user