summaryrefslogtreecommitdiff
path: root/src/network/core/tcp_listen.h
diff options
context:
space:
mode:
authorrubidium42 <rubidium@openttd.org>2021-04-30 15:38:22 +0200
committerrubidium42 <rubidium42@users.noreply.github.com>2021-05-01 19:36:22 +0200
commit22720332eb9922e20148c7aae1127f7304f6f7d3 (patch)
tree0efbcfac24474a10f88f956c1f4721cdd7af97e0 /src/network/core/tcp_listen.h
parent0eb17a70af86d11e49d9560088900c9d65cb07c1 (diff)
downloadopenttd-22720332eb9922e20148c7aae1127f7304f6f7d3.tar.xz
Codechange: encapsulate network error handling
Diffstat (limited to 'src/network/core/tcp_listen.h')
-rw-r--r--src/network/core/tcp_listen.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/core/tcp_listen.h b/src/network/core/tcp_listen.h
index 2ceea20aa..e23ecae70 100644
--- a/src/network/core/tcp_listen.h
+++ b/src/network/core/tcp_listen.h
@@ -64,7 +64,7 @@ public:
DEBUG(net, 1, "[%s] Banned ip tried to join (%s), refused", Tsocket::GetName(), entry.c_str());
if (p.TransferOut<int>(send, s, 0) < 0) {
- DEBUG(net, 0, "send failed with error %s", NetworkGetLastErrorString());
+ DEBUG(net, 0, "send failed with error %s", NetworkError::GetLast().AsString());
}
closesocket(s);
break;
@@ -81,7 +81,7 @@ public:
p.PrepareToSend();
if (p.TransferOut<int>(send, s, 0) < 0) {
- DEBUG(net, 0, "send failed with error %s", NetworkGetLastErrorString());
+ DEBUG(net, 0, "send failed with error %s", NetworkError::GetLast().AsString());
}
closesocket(s);