X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fthreadcontroller.cpp;fp=src%2Fthreadcontroller.cpp;h=48984e881f0695d28cf71c8bfcaf1c3297a4df50;hb=f60495a029c54358f82956482fe203fe2b7b5b23;hp=8bfb7b59621ac1fe79991803b6ebe1c6c435b934;hpb=b9c3763a932cebaa015a27fe111017f6f34dfbaa;p=fms.git diff --git a/src/threadcontroller.cpp b/src/threadcontroller.cpp index 8bfb7b5..48984e8 100644 --- a/src/threadcontroller.cpp +++ b/src/threadcontroller.cpp @@ -39,7 +39,7 @@ void ThreadController::ReadConfig() } tempval=""; - Option::Instance()->Get("StartHHTP",tempval); + Option::Instance()->Get("StartHTTP",tempval); if(tempval=="true") { m_starthttp=true; @@ -53,6 +53,7 @@ void ThreadController::ReadConfig() void ThreadController::RestartThreads() { + m_log->WriteLog(LogFile::LOGLEVEL_INFO,"ThreadController::RestartThreads restarting threads."); ShutdownThreads(); StartThreads(); } @@ -61,6 +62,7 @@ void ThreadController::ShutdownFreenetThread() { if(m_freenetthread) { + m_log->WriteLog(LogFile::LOGLEVEL_INFO,"ThreadController::ShutdownFreenetThread shutting down Freenet thread."); m_freenetthread->Cancel(); m_freenetthread->Join(); delete m_freenetthread; @@ -72,6 +74,7 @@ void ThreadController::ShutdownHTTPThread() { if(m_httpthread) { + m_log->WriteLog(LogFile::LOGLEVEL_INFO,"ThreadController::ShutdownHTTPThread shutting down HTTP thread."); m_httpthread->Cancel(); m_httpthread->Join(); delete m_httpthread; @@ -83,6 +86,7 @@ void ThreadController::ShutdownNNTPThread() { if(m_nntpthread) { + m_log->WriteLog(LogFile::LOGLEVEL_INFO,"ThreadController::ShutdownNNTPThread shutting down NNTP thread."); m_nntpthread->Cancel(); m_nntpthread->Join(); delete m_nntpthread; @@ -99,16 +103,19 @@ void ThreadController::ShutdownThreads() void ThreadController::StartFreenetThread() { + m_log->WriteLog(LogFile::LOGLEVEL_INFO,"ThreadController::StartFreenetThread starting Freenet thread."); m_freenetthread=new PThread::Thread(new FreenetMasterThread()); } void ThreadController::StartHTTPThread() { + m_log->WriteLog(LogFile::LOGLEVEL_INFO,"ThreadController::StartHTTPThread starting HTTP thread."); m_httpthread=new PThread::Thread(new HTTPThread()); } void ThreadController::StartNNTPThread() { + m_log->WriteLog(LogFile::LOGLEVEL_INFO,"ThreadController::StartNNTPThread starting NNTP thread."); m_nntpthread=new PThread::Thread(new NNTPListener()); }