diff options
| author | 2023-01-16 22:54:02 +0000 | |
|---|---|---|
| committer | 2023-01-16 22:54:02 +0000 | |
| commit | 612e1a30274bf4e239077f63a877440eb134da4d (patch) | |
| tree | 77402bfa73ce247460a6613de28a393dde2122f6 /src | |
| parent | Fix some testing changes that snuck in to the previous commit. (diff) | |
| download | inspircd++-612e1a30274bf4e239077f63a877440eb134da4d.tar.gz inspircd++-612e1a30274bf4e239077f63a877440eb134da4d.tar.bz2 inspircd++-612e1a30274bf4e239077f63a877440eb134da4d.zip | |
Store the actual error in FailedPort instead of an error code.
Diffstat (limited to 'src')
| -rw-r--r-- | src/configreader.cpp | 2 | ||||
| -rw-r--r-- | src/inspircd.cpp | 2 | ||||
| -rw-r--r-- | src/socket.cpp | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp index 7556aab97..baa109d05 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -434,7 +434,7 @@ void ServerConfig::Apply(ServerConfig* old, const std::string& useruid) errstr << "Warning! Some of your listener" << (pl.size() == 1 ? "s" : "") << " failed to bind:" << std::endl; for (const auto& fp : pl) { - errstr << " " << fp.sa.str() << ": " << strerror(fp.error) << std::endl + errstr << " " << fp.sa.str() << ": " << fp.error << std::endl << " " << "Created from <bind> tag at " << fp.tag->source.str() << std::endl; } } diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 7774965fc..e7b6257bd 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -378,7 +378,7 @@ namespace for (const auto& fp : pl) { - std::cout << " " << rang::style::bold << fp.sa.str() << rang::style::reset << ": " << strerror(fp.error) << '.' << std::endl + std::cout << " " << rang::style::bold << fp.sa.str() << rang::style::reset << ": " << fp.error << '.' << std::endl << " " << "Created from <bind> tag at " << fp.tag->source.str() << std::endl << std::endl; } diff --git a/src/socket.cpp b/src/socket.cpp index 05b94de8b..171f7368a 100644 --- a/src/socket.cpp +++ b/src/socket.cpp @@ -108,7 +108,7 @@ size_t InspIRCd::BindPorts(FailedPortList& failed_ports) continue; if (!BindPort(tag, bindspec, old_ports, protocol)) - failed_ports.emplace_back(errno, bindspec, tag); + failed_ports.emplace_back(strerror(errno), bindspec, tag); else bound++; } @@ -141,7 +141,7 @@ size_t InspIRCd::BindPorts(FailedPortList& failed_ports) bindspec.from_unix(fullpath); if (!BindPort(tag, bindspec, old_ports, 0)) - failed_ports.emplace_back(errno, bindspec, tag); + failed_ports.emplace_back(strerror(errno), bindspec, tag); else bound++; } |
