X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Finspircd.cpp;h=cb019ca7c35f464fcfd5264591337653802b20dc;hb=0da6b3a13def40e8fd002b9fc60f955467f6372d;hp=a2a634a64559697358c439a9d97bce73ee431e59;hpb=5f309503fa985faa5b255246fc0415455c1c65ee;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/inspircd.cpp b/src/inspircd.cpp index a2a634a64..cb019ca7c 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -774,11 +774,9 @@ int InspIRCd::Run() this->Logs->Log("CONFIG",DEBUG,"Detected ConfigThread exiting, tidying up..."); - /* These are currently not known to be threadsafe, so they are executed outside - * of the thread. It would be pretty simple to move them to the thread Run method - * once they are known threadsafe with all the correct mutexes in place. This might - * not be worth the effort however as these functions execute relatively quickly - * and would not benefit from being within the config read thread. + /* + * Apply the changed configuration from the rehash. This is not done within the + * configuration thread becasuse they may invoke functions that are not threadsafe. * * XXX: The order of these is IMPORTANT, do not reorder them without testing * thoroughly!!! @@ -789,13 +787,9 @@ int InspIRCd::Run() this->ResetMaxBans(); InitializeDisabledCommands(Config->DisabledCommands, this); User* user = !Config->RehashUserUID.empty() ? FindNick(Config->RehashUserUID) : NULL; - FOREACH_MOD_I(this, I_OnRehash, OnRehash(user, Config->RehashParameter)); + FOREACH_MOD_I(this, I_OnRehash, OnRehash(user)); this->BuildISupport(); - /* IMPORTANT: This delete may hang if you fuck up your thread syncronization. - * It will hang waiting for the ConfigThread to 'join' to avoid race conditons, - * until the other thread is completed. - */ delete ConfigThread; ConfigThread = NULL; }