bool Daemon_Singleton::stop() { LogPrint("Shutdown started."); d.httpProxy->Stop(); LogPrint("HTTP Proxy stoped"); d.socksProxy->Stop(); LogPrint("SOCKS Proxy stoped"); i2p::stream::StopStreaming(); LogPrint("Streaming stoped"); i2p::garlic::routing.Stop(); LogPrint("Routing stoped"); i2p::tunnel::tunnels.Stop(); LogPrint("Tunnels stoped"); i2p::transports.Stop(); LogPrint("Transports stoped"); i2p::data::netdb.Stop(); LogPrint("NetDB stoped"); d.httpServer->Stop(); LogPrint("HTTP Server stoped"); StopLog (); delete d.socksProxy; d.socksProxy = nullptr; delete d.httpProxy; d.httpProxy = nullptr; delete d.httpServer; d.httpServer = nullptr; return true; }
void StopI2P () { LogPrint(eLogInfo, "API: shutting down"); LogPrint(eLogInfo, "API: stopping Tunnels"); i2p::tunnel::tunnels.Stop(); LogPrint(eLogInfo, "API: stopping Transports"); i2p::transport::transports.Stop(); LogPrint(eLogInfo, "API: stopping NetDB"); i2p::data::netdb.Stop(); StopLog (); }
void StopI2P () { LogPrint("Shutdown started."); i2p::tunnel::tunnels.Stop(); LogPrint("Tunnels stopped"); i2p::transport::transports.Stop(); LogPrint("Transports stopped"); i2p::data::netdb.Stop(); LogPrint("NetDB stopped"); StopLog (); }
MythXDisplay::~MythXDisplay() { MythXLocker locker(this); if (m_disp) { if (m_gc) XFreeGC(m_disp, m_gc); StopLog(); if (xdisplays.count(m_disp)) xdisplays.erase(m_disp); XCloseDisplay(m_disp); m_disp = NULL; } }
void StartLog (void) { if (!LogOptions.GenerateLog) { StopLog(); return; } if (hLogFile) { return; } CPath LogFile(CPath::MODULE_DIRECTORY); LogFile.AppendDirectory(_T("Logs")); LogFile.SetNameExtension(_T("cpudebug.log")); hLogFile = CreateFile(LogFile,GENERIC_WRITE, FILE_SHARE_READ,NULL,CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN, NULL); SetFilePointer(hLogFile,0,NULL,FILE_BEGIN); }
void CLogging::StartLog(void) { if (!GenerateLog()) { StopLog(); return; } if (m_hLogFile != NULL) { return; } CPath LogFile(CPath::MODULE_DIRECTORY); LogFile.AppendDirectory("Logs"); LogFile.SetNameExtension("cpudebug.log"); m_hLogFile = new CFile(LogFile, CFileBase::modeCreate | CFileBase::modeWrite); }
void Log::execute(void* arg){ while (1) { char charIn = getchar(); if(charIn == 'l' && LogRunning == false){ LogRunning = true; printf("Log ausgabe"); ShowLog(); }else if(charIn == 'l' && LogRunning == true){ StopLog(); LogRunning = false; } } }
void CLogging::StartLog(void) { if (!GenerateLog()) { StopLog(); return; } if (m_hLogFile != NULL) { return; } CPath LogFile(g_Settings->LoadStringVal(Cmd_BaseDirectory).c_str(),""); LogFile.AppendDirectory("Logs"); LogFile.SetNameExtension("cpudebug.log"); m_hLogFile = new CFile(LogFile, CFileBase::modeCreate | CFileBase::modeWrite); }
bool Daemon_Singleton::stop() { LogPrint("Shutdown started."); i2p::client::context.Stop(); LogPrint("Client stoped"); i2p::tunnel::tunnels.Stop(); LogPrint("Tunnels stoped"); i2p::transport::transports.Stop(); LogPrint("Transports stoped"); i2p::data::netdb.Stop(); LogPrint("NetDB stoped"); d.httpServer->Stop(); LogPrint("HTTP Server stoped"); StopLog (); delete d.httpServer; d.httpServer = nullptr; return true; }
bool MythXDisplay::CreateGC(Window win) { StartLog(); XLOCK(this, m_gc = XCreateGC(m_disp, win, 0, NULL)); return StopLog(); }