Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(581)

Unified Diff: runtime/bin/socket_win.cc

Issue 11564017: Complete the transition to unicode APIs on Windows. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/process_win.cc ('k') | runtime/platform/globals.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/socket_win.cc
diff --git a/runtime/bin/socket_win.cc b/runtime/bin/socket_win.cc
index adc6aef87ae7026ad3dabfa9f11e29ee513644c3..0a31298f8201770bc2eb14c0191c37ac84f38675 100644
--- a/runtime/bin/socket_win.cc
+++ b/runtime/bin/socket_win.cc
@@ -67,11 +67,11 @@ bool Socket::GetRemotePeer(intptr_t fd, char *host, intptr_t *port) {
// includes the port in the formatted string.
socket_address.sin_port = 0;
DWORD len = INET_ADDRSTRLEN;
- int err = WSAAddressToString(reinterpret_cast<LPSOCKADDR>(&socket_address),
- sizeof(socket_address),
- NULL,
- host,
- &len);
+ int err = WSAAddressToStringA(reinterpret_cast<LPSOCKADDR>(&socket_address),
+ sizeof(socket_address),
+ NULL,
+ host,
+ &len);
if (err != 0) {
Log::PrintErr("Error WSAAddressToString: %d\n", WSAGetLastError());
return false;
@@ -196,11 +196,11 @@ const char* Socket::LookupIPv4Address(char* host, OSError** os_error) {
// Clear the port before calling WSAAddressToString as WSAAddressToString
// includes the port in the formatted string.
DWORD len = INET_ADDRSTRLEN;
- int err = WSAAddressToString(reinterpret_cast<LPSOCKADDR>(sockaddr),
- sizeof(sockaddr_in),
- NULL,
- buffer,
- &len);
+ int err = WSAAddressToStringA(reinterpret_cast<LPSOCKADDR>(sockaddr),
+ sizeof(sockaddr_in),
+ NULL,
+ buffer,
+ &len);
if (err != 0) {
free(buffer);
return NULL;
« no previous file with comments | « runtime/bin/process_win.cc ('k') | runtime/platform/globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698