am b00d7a33: am eae1f1fb: Merge "res_send: Avoid spurious close()s and (rare) failure"

* commit 'b00d7a331c9f2a578a4cfc4dfe0d626aa58fa702':
  res_send: Avoid spurious close()s and (rare) failure
This commit is contained in:
Jean-Baptiste Queru 2012-01-17 18:18:29 -08:00 committed by Android Git Automerger
commit 5f926c2679

View File

@ -421,7 +421,7 @@ res_nsend(res_state statp,
if (EXT(statp).nssocks[ns] == -1)
continue;
peerlen = sizeof(peer);
if (getsockname(EXT(statp).nssocks[ns],
if (getpeername(EXT(statp).nssocks[ns],
(struct sockaddr *)(void *)&peer, &peerlen) < 0) {
needclose++;
break;