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:
+2
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user