aboutsummaryrefslogtreecommitdiff
path: root/src/socket.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2023-04-27 11:52:26 +0100
committerGravatar Sadie Powell2023-04-27 11:53:55 +0100
commitc65fbcb5717a6fc0177e93838450e0d4b79bcf60 (patch)
tree037c1338e2303f9b4a82842402774bcf8aa6bdf9 /src/socket.cpp
parentMerge branch 'insp3' into master. (diff)
Use the correct socket error messages on Windows.
Diffstat (limited to 'src/socket.cpp')
-rw-r--r--src/socket.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/socket.cpp b/src/socket.cpp
index 484dcf81d..d3dea3c72 100644
--- a/src/socket.cpp
+++ b/src/socket.cpp
@@ -55,7 +55,7 @@ bool InspIRCd::BindPort(const std::shared_ptr<ConfigTag>& tag, const irc::socket
if (!ll->HasFd())
{
ServerInstance->Logs.Normal("SOCKET", "Failed to listen on {} from tag at {}: {}",
- sa.str(), tag->source.str(), strerror(errno));
+ sa.str(), tag->source.str(), SocketEngine::LastError());
delete ll;
return false;
}
@@ -152,7 +152,7 @@ size_t InspIRCd::BindPorts(FailedPortList& failed_ports)
for (const auto protocol : protocols)
{
if (!BindPort(tag, bindspec, old_ports, protocol))
- failed_ports.emplace_back(strerror(errno), bindspec, tag);
+ failed_ports.emplace_back(SocketEngine::LastError(), bindspec, tag);
else
bound++;
}
@@ -184,7 +184,7 @@ size_t InspIRCd::BindPorts(FailedPortList& failed_ports)
bindspec.from_unix(fullpath);
if (!BindPort(tag, bindspec, old_ports, 0))
- failed_ports.emplace_back(strerror(errno), bindspec, tag);
+ failed_ports.emplace_back(SocketEngine::LastError(), bindspec, tag);
else
bound++;
}