diff options
author | glx <glx@openttd.org> | 2009-01-20 04:01:07 +0000 |
---|---|---|
committer | glx <glx@openttd.org> | 2009-01-20 04:01:07 +0000 |
commit | 62ec25a8ff028b9597b9bc254984cd9c0af1b8aa (patch) | |
tree | 5e78e77c8d91d962efa33e8f1b3bfe900090e86d /src | |
parent | 82e98c2188b5e449384b6aa07442001aa62bed01 (diff) | |
download | openttd-62ec25a8ff028b9597b9bc254984cd9c0af1b8aa.tar.xz |
(svn r15160) -Fix (r15157): port != IP
Diffstat (limited to 'src')
-rw-r--r-- | src/network/network.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/network.cpp b/src/network/network.cpp index edf6a51b6..8b70b3e22 100644 --- a/src/network/network.cpp +++ b/src/network/network.cpp @@ -468,7 +468,7 @@ static bool NetworkConnect(NetworkAddress address) sin.sin_family = AF_INET; sin.sin_addr.s_addr = address.GetIP(); - sin.sin_port = htons(address.GetIP()); + sin.sin_port = htons(address.GetPort()); _network_last_host_ip = sin.sin_addr.s_addr; /* We failed to connect for which reason what so ever */ @@ -1094,7 +1094,7 @@ void NetworkStartDebugLog(NetworkAddress address) 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.GetIP()); + DEBUG(net, 0, "Failed to redirection DEBUG() to %s:%d", address.GetHostname(), address.GetPort()); return; } |