aboutsummaryrefslogtreecommitdiffstats
path: root/src/configreader.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2023-01-16 23:19:56 +0000
committerGravatar Sadie Powell2023-01-17 00:37:14 +0000
commita99a38a3ad8012803118a3b92b20024f28b6e29b (patch)
treec4e7204ec738c036da5b6a4045d6fa58ad8df18f /src/configreader.cpp
parentStore the actual error in FailedPort instead of an error code. (diff)
Allow creating a FailedPort without a bindspec.
Diffstat (limited to 'src/configreader.cpp')
-rw-r--r--src/configreader.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp
index baa109d05..d6a584540 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -434,8 +434,10 @@ 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() << ": " << fp.error << std::endl
- << " " << "Created from <bind> tag at " << fp.tag->source.str() << std::endl;
+ if (fp.sa.family() != AF_UNSPEC)
+ errstr << " " << fp.sa.str() << ": ";
+
+ errstr << fp.error << std::endl << " " << "Created from <bind> tag at " << fp.tag->source.str() << std::endl;
}
}
}