From ba5610654bdedee84bfdcda9edf9f4ab0b4ba4d6 Mon Sep 17 00:00:00 2001 From: psychon Date: Tue, 3 Feb 2009 18:21:33 +0000 Subject: [PATCH] Improve the error messages we give for failed connect attempts... again EADDRNOTAVAIL is generated for these failed vhosts instead of EDOM as it did before. Yay for Csocket. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1367 726aef4b-f618-498e-8847-2d620e286838 --- IRCSock.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/IRCSock.cpp b/IRCSock.cpp index 94dd614a..ec71c451 100644 --- a/IRCSock.cpp +++ b/IRCSock.cpp @@ -836,8 +836,12 @@ void CIRCSock::SockError(int iErrno) { sError = "Your VHost could not be resolved"; } else if (iErrno == EADDRNOTAVAIL) { // Csocket uses this if it can't resolve the dest host name + // ...but it also does generate this if bind() fails -.- sError = strerror(iErrno); - sError += " (Is your IRC server's host name valid?)"; + if (GetBindHost().empty()) + sError += " (Is your IRC server's host name valid?)"; + else + sError += " (Is your IRC server's host name and vhost valid?)"; } else { sError = strerror(iErrno); }