1
0
mirror of https://github.com/anope/anope.git synced 2026-06-28 07:36:37 +02:00

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.

This commit is contained in:
Adam
2010-09-17 19:20:07 -04:00
parent f71fb6e813
commit 227909e2cf
19 changed files with 106 additions and 127 deletions
+2 -2
View File
@@ -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