From: <ps...@us...> - 2008-10-23 15:20:28
|
Revision: 1259 http://znc.svn.sourceforge.net/znc/?rev=1259&view=rev Author: psychon Date: 2008-10-23 15:20:09 +0000 (Thu, 23 Oct 2008) Log Message: ----------- 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 Modified Paths: -------------- trunk/modules/webadmin.cpp Modified: trunk/modules/webadmin.cpp =================================================================== --- trunk/modules/webadmin.cpp 2008-10-22 19:40:51 UTC (rev 1258) +++ trunk/modules/webadmin.cpp 2008-10-23 15:20:09 UTC (rev 1259) @@ -166,9 +166,14 @@ } #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; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |