diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-07-17 20:07:58 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-07-17 20:07:58 +0000 |
commit | 21bb2f2acf59f1bdf2853908fe82601531068a21 (patch) | |
tree | 0ca85237189811de58ae6b2b2e75aa9f080cb5af | |
parent | 681985c2cb121397fe54d3bcd0ab75d2d8ff04c3 (diff) |
Combine IP+port in a failed port list, show (the more helpful) error string so the user can have some idea of what actually went wrong.. why we forced people to strace is beyond me..
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10030 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | include/inspircd.h | 2 | ||||
-rw-r--r-- | src/configreader.cpp | 2 | ||||
-rw-r--r-- | src/inspircd.cpp | 2 | ||||
-rw-r--r-- | src/socket.cpp | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/include/inspircd.h b/include/inspircd.h index 10729d308..9ef5dbcfb 100644 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -235,7 +235,7 @@ class serverstats : public classbase }; /** A list of failed port bindings, used for informational purposes on startup */ -typedef std::vector<std::pair<std::string, long> > FailedPortList; +typedef std::vector<std::pair<std::string, std::string> > FailedPortList; class InspIRCd; diff --git a/src/configreader.cpp b/src/configreader.cpp index 72429f8ac..29ee55eb9 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -1253,7 +1253,7 @@ void ServerConfig::Read(bool bail, User* user) int j = 1; for (FailedPortList::iterator i = pl.begin(); i != pl.end(); i++, j++) { - user->WriteServ("NOTICE %s :*** %d. IP: %s Port: %lu", user->nick.c_str(), j, i->first.empty() ? "<all>" : i->first.c_str(), (unsigned long)i->second); + user->WriteServ("NOTICE %s :*** %d. Address: %s Reason: %s", user->nick.c_str(), j, i->first.empty() ? "<all>" : i->first.c_str(), i->second.c_str()); } ServerInstance->Threads->Mutex(false); } diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 72214dd1e..ac5ee4510 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -679,7 +679,7 @@ InspIRCd::InspIRCd(int argc, char** argv) int j = 1; for (FailedPortList::iterator i = pl.begin(); i != pl.end(); i++, j++) { - printf("%d.\tIP: %s\tPort: %lu\n", j, i->first.empty() ? "<all>" : i->first.c_str(), (unsigned long)i->second); + printf("%d.\tAddress: %s\tReason: %s\n", j, i->first.empty() ? "<all>" : i->first.c_str(), i->second.c_str()); } } diff --git a/src/socket.cpp b/src/socket.cpp index 6baa42ed0..0e3cf3543 100644 --- a/src/socket.cpp +++ b/src/socket.cpp @@ -355,7 +355,7 @@ int InspIRCd::BindPorts(bool, int &ports_found, FailedPortList &failed_ports) } else { - failed_ports.push_back(std::make_pair(Addr, portno)); + failed_ports.push_back(std::make_pair(Addr + portno, strerror(errno))); } ports_found++; } |