diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-16 12:18:27 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-16 12:18:27 +0000 |
commit | b593267ff17558906cff94e5b30ada977364294a (patch) | |
tree | a1ac4670c6bbe51e154d1dde913f2d747e01ffa2 /src | |
parent | 9d37575438cd4b907396e89fb174a7e519508be9 (diff) |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/inspircd.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp index ddd5c148f..e787da5ae 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -209,9 +209,6 @@ InspIRCd::InspIRCd(int argc, char** argv) SE = new SocketEngine(); /* We must load the modules AFTER initializing the socket engine, now */ - LoadAllModules(); - - printf("\nInspIRCd is now running!\n"); return; } @@ -395,8 +392,14 @@ int InspIRCd::Run() char* target; unsigned int numberactive; 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) { freopen("/dev/null","w",stdout); |