From b87d2bf8dc9838ee59dd16adee255aca956ab9f7 Mon Sep 17 00:00:00 2001 From: dz Date: Sat, 4 Apr 2009 18:02:51 +0000 Subject: Don't do anything with logging in the handler for /REHASH. What was here would close all of the logs and attempt to reopen only the startup log, resulting in a crash if the startup log had been properly closed already. Logs are already properly restarted when the config thread exits. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11284 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/commands/cmd_rehash.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/commands/cmd_rehash.cpp') diff --git a/src/commands/cmd_rehash.cpp b/src/commands/cmd_rehash.cpp index 4182de830..d9d72800e 100644 --- a/src/commands/cmd_rehash.cpp +++ b/src/commands/cmd_rehash.cpp @@ -51,13 +51,10 @@ CmdResult CommandRehash::Handle (const std::vector& parameters, Use std::string m = user->nick + " is rehashing config file " + ServerConfig::CleanFilename(ServerInstance->ConfigFileName) + " on " + ServerInstance->Config->ServerName; ServerInstance->SNO->WriteToSnoMask('A', m); - ServerInstance->Logs->CloseLogs(); - if (!ServerInstance->OpenLog(ServerInstance->Config->argv, ServerInstance->Config->argc)) - { - m = std::string("ERROR: Could not open logfile ") + ServerInstance->Config->logpath + ":" + strerror(errno); - ServerInstance->SNO->WriteToSnoMask('A', m); - } + /* Don't do anything with the logs here -- logs are restarted + * after the config thread has completed. + */ ServerInstance->RehashUsersAndChans(); FOREACH_MOD(I_OnGarbageCollect, OnGarbageCollect()); -- cgit v1.2.3