diff options
author | rubidium <rubidium@openttd.org> | 2009-04-02 20:39:30 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-04-02 20:39:30 +0000 |
commit | c5160c7c8e80b1b64bf474ec1d2a54c2bcef690b (patch) | |
tree | a76360971db13f30d480449e26cf22d898d0a178 /src/network/network.cpp | |
parent | 1e205e01b83ac995c14105e0eb1f992cbd3e0625 (diff) | |
download | openttd-c5160c7c8e80b1b64bf474ec1d2a54c2bcef690b.tar.xz |
(svn r15917) -Codechange: remove the latest traces of NetworkAddress::GetIP.
Diffstat (limited to 'src/network/network.cpp')
-rw-r--r-- | src/network/network.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/network/network.cpp b/src/network/network.cpp index 9e78f0411..e88b7a1f8 100644 --- a/src/network/network.cpp +++ b/src/network/network.cpp @@ -1090,7 +1090,6 @@ void NetworkStartDebugLog(NetworkAddress address) { extern SOCKET _debug_socket; // Comes from debug.c SOCKET s; - struct sockaddr_in sin; DEBUG(net, 0, "Redirecting DEBUG() to %s:%d", address.GetHostname(), address.GetPort()); @@ -1102,12 +1101,8 @@ void NetworkStartDebugLog(NetworkAddress address) if (!SetNoDelay(s)) DEBUG(net, 1, "Setting TCP_NODELAY failed"); - sin.sin_family = AF_INET; - sin.sin_addr.s_addr = address.GetIP(); - sin.sin_port = htons(address.GetPort()); - - if (connect(s, (struct sockaddr *)&sin, sizeof(sin)) != 0) { - DEBUG(net, 0, "Failed to redirection DEBUG() to %s:%d", address.GetHostname(), address.GetPort()); + if (connect(s, (struct sockaddr *)address.GetAddress(), sizeof(*address.GetAddress())) != 0) { + DEBUG(net, 0, "Failed to redirection DEBUG() to %s", address.GetAddressAsString()); return; } |