mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Improve webadmin's error messages
I just got this: (binding to ::1 on an ipv4-only build) Module [webadmin] aborted: Could not bind to port 8080: No such file or directory Module [webadmin] aborted: Could not bind to port 8080: Success git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1259 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -166,9 +166,14 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
errno = 0;
|
||||
bool b = m_pManager->ListenHost(m_uPort, "WebAdmin::Listener", m_sListenHost, bSSL, SOMAXCONN, pListenSock, 0, bIPv6);
|
||||
if (!b) {
|
||||
sMessage = "Could not bind to port " + CString(m_uPort) + ": " + CString(strerror(errno));
|
||||
sMessage = "Could not bind to port " + CString(m_uPort);
|
||||
if (!m_sListenHost.empty())
|
||||
sMessage += " on vhost [" + m_sListenHost + "]";
|
||||
if (errno != 0)
|
||||
sMessage += ": " + CString(strerror(errno));
|
||||
}
|
||||
return b;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user