mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-11 11:39:02 -04:00
Moved LoadAllModules out of constructor, because value of 'this' isnt assigned till AFTER constructor is done so this means that if we load modules this early, we get a segfault. Load modules within ::Run().
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2526 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
parent
9d37575438
commit
b593267ff1
@ -209,9 +209,6 @@ InspIRCd::InspIRCd(int argc, char** argv)
|
|||||||
SE = new SocketEngine();
|
SE = new SocketEngine();
|
||||||
|
|
||||||
/* We must load the modules AFTER initializing the socket engine, now */
|
/* We must load the modules AFTER initializing the socket engine, now */
|
||||||
LoadAllModules();
|
|
||||||
|
|
||||||
printf("\nInspIRCd is now running!\n");
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -395,8 +392,14 @@ int InspIRCd::Run()
|
|||||||
char* target;
|
char* target;
|
||||||
unsigned int numberactive;
|
unsigned int numberactive;
|
||||||
sockaddr_in sock_us; // our port number
|
sockaddr_in sock_us; // our port number
|
||||||
socklen_t uslen; // length of our port number
|
socklen_t uslen; // length of our port number
|
||||||
|
|
||||||
|
/* Until THIS point, ServerInstance == NULL */
|
||||||
|
|
||||||
|
LoadAllModules();
|
||||||
|
|
||||||
|
printf("\nInspIRCd is now running!\n");
|
||||||
|
|
||||||
if (!Config->nofork)
|
if (!Config->nofork)
|
||||||
{
|
{
|
||||||
freopen("/dev/null","w",stdout);
|
freopen("/dev/null","w",stdout);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user