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

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

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;