summaryrefslogtreecommitdiff
path: root/src/network/core/tcp_listen.h
diff options
context:
space:
mode:
authorrubidium42 <rubidium@openttd.org>2021-06-12 09:10:17 +0200
committerrubidium42 <rubidium42@users.noreply.github.com>2021-06-13 12:45:45 +0200
commit55a11710a6c0f7942f3947711f2050c34782c39d (patch)
tree491b3009324e623236977614e91371a0ea4abac7 /src/network/core/tcp_listen.h
parenta99ac62c1ab816ee48cac85fdf834f9fdc599cb1 (diff)
downloadopenttd-55a11710a6c0f7942f3947711f2050c34782c39d.tar.xz
Codechange: convert printf DEBUG statements to fmt Debug statements
Diffstat (limited to 'src/network/core/tcp_listen.h')
-rw-r--r--src/network/core/tcp_listen.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/network/core/tcp_listen.h b/src/network/core/tcp_listen.h
index 40fc84efe..1cde4a179 100644
--- a/src/network/core/tcp_listen.h
+++ b/src/network/core/tcp_listen.h
@@ -49,7 +49,7 @@ public:
SetNonBlocking(s); // XXX error handling?
NetworkAddress address(sin, sin_len);
- DEBUG(net, 3, "[%s] Client connected from %s on frame %d", Tsocket::GetName(), address.GetHostname(), _frame_counter);
+ Debug(net, 3, "[{}] Client connected from {} on frame {}", Tsocket::GetName(), address.GetHostname(), _frame_counter);
SetNoDelay(s); // XXX error handling?
@@ -61,10 +61,10 @@ public:
Packet p(Tban_packet);
p.PrepareToSend();
- DEBUG(net, 2, "[%s] Banned ip tried to join (%s), refused", Tsocket::GetName(), entry.c_str());
+ Debug(net, 2, "[{}] Banned ip tried to join ({}), refused", Tsocket::GetName(), entry);
if (p.TransferOut<int>(send, s, 0) < 0) {
- DEBUG(net, 0, "[%s] send failed: %s", Tsocket::GetName(), NetworkError::GetLast().AsString());
+ Debug(net, 0, "[{}] send failed: {}", Tsocket::GetName(), NetworkError::GetLast().AsString());
}
closesocket(s);
break;
@@ -81,7 +81,7 @@ public:
p.PrepareToSend();
if (p.TransferOut<int>(send, s, 0) < 0) {
- DEBUG(net, 0, "[%s] send failed: %s", Tsocket::GetName(), NetworkError::GetLast().AsString());
+ Debug(net, 0, "[{}] send failed: {}", Tsocket::GetName(), NetworkError::GetLast().AsString());
}
closesocket(s);
@@ -150,7 +150,7 @@ public:
}
if (sockets.size() == 0) {
- DEBUG(net, 0, "Could not start network: could not create listening socket");
+ Debug(net, 0, "Could not start network: could not create listening socket");
ShowNetworkError(STR_NETWORK_ERROR_SERVER_START);
return false;
}
@@ -165,7 +165,7 @@ public:
closesocket(s.second);
}
sockets.clear();
- DEBUG(net, 5, "[%s] Closed listeners", Tsocket::GetName());
+ Debug(net, 5, "[{}] Closed listeners", Tsocket::GetName());
}
};