diff options
author | Adam <Adam@anope.org> | 2010-09-17 19:20:07 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2010-09-17 19:20:07 -0400 |
commit | 227909e2cf0039737dc52872651837fe5f1702b5 (patch) | |
tree | b8a7072c7d938ea66d9710a48d717b3eb76343de /src/init.cpp | |
parent | f71fb6e8133da955a58b1cca00013ce20c0b65cc (diff) |
Rejig of some of the socket stuff. Fixed marking sockets as nonblocking on Windows. Added in a LastError function to keep having to use strerror/GetLastError everywhere.
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/init.cpp b/src/init.cpp index 1de213a11..d882f34be 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -301,7 +301,7 @@ void Init(int ac, char **av) /* Chdir to Services data directory. */ if (chdir(services_dir.c_str()) < 0) { - throw FatalException("Unable to chdir to " + services_dir + ": " + Anope::string(strerror(errno))); + throw FatalException("Unable to chdir to " + services_dir + ": " + Anope::LastError()); } Log(LOG_TERMINAL) << "Anope " << Anope::Version() << ", " << Anope::Build(); @@ -367,7 +367,7 @@ void Init(int ac, char **av) ModuleManager::LoadModuleList(Config->DBModuleList); /* Load the socket engine */ - if (ModuleManager::LoadModule(Config->SocketEngine, NULL)) + if (ModuleManager::LoadModule(Config->SocketEngine, NULL) || !SocketEngine) throw FatalException("Unable to load socket engine " + Config->SocketEngine); try |