| Index: runtime/bin/secure_socket.cc
|
| diff --git a/runtime/bin/secure_socket.cc b/runtime/bin/secure_socket.cc
|
| index 7a5b6f3ad5f21d57b79cb1c63be1b0ed145d37f8..e66ff357c576bf11ed7db7c7b5af44a679770a82 100644
|
| --- a/runtime/bin/secure_socket.cc
|
| +++ b/runtime/bin/secure_socket.cc
|
| @@ -560,17 +560,19 @@ void SSLFilter::Connect(const char* host_name,
|
|
|
| // SetPeerAddress
|
| PRNetAddr host_address;
|
| - PRAddrInfo* info = PR_GetAddrInfoByName(host_name,
|
| - PR_AF_UNSPEC,
|
| - PR_AI_ADDRCONFIG);
|
| - if (info == NULL) {
|
| - ThrowPRException("Failed PR_GetAddrInfoByName call");
|
| + char host_entry_buffer[PR_NETDB_BUF_SIZE];
|
| + PRHostEnt host_entry;
|
| + PRStatus rv = PR_GetHostByName(host_name, host_entry_buffer,
|
| + PR_NETDB_BUF_SIZE, &host_entry);
|
| + if (rv != PR_SUCCESS) {
|
| + ThrowPRException("Failed PR_GetHostByName call");
|
| }
|
|
|
| - PR_EnumerateAddrInfo(0, info, port, &host_address);
|
| -
|
| + int index = PR_EnumerateHostEnt(0, &host_entry, port, &host_address);
|
| + if (index == -1 || index == 0) {
|
| + ThrowPRException("Failed PR_EnumerateHostEnt call");
|
| + }
|
| memio_SetPeerName(filter_, &host_address);
|
| - PR_FreeAddrInfo(info);
|
| }
|
|
|
|
|
|
|