--- innwebd/service.cpp 2004/07/03 15:10:23 1.2 +++ innwebd/service.cpp 2004/07/09 00:33:38 1.4 @@ -1,10 +1,10 @@ /*******************************************************/ /* */ -/* LeafOK Innd */ +/* LeafOK Innbbsd */ /* Copyright (C) LeafOK.com, 2003-2004 */ /* */ /* Programmed by Leaf */ -/* E-mail:leaf@leafok.com QQ:6049044 */ +/* E-mail:leaflet@leafok.com QQ:6049044 */ /* */ /* http://bbs.leafok.com */ /* http://bbs.leafok.net */ @@ -14,12 +14,15 @@ #include "StdAfx.h" #include ".\service.h" +#include ".\App_common.h" using namespace std; service::service(void) - :CNTService("Innd Service") +:CNTService(App_common::ServiceName) { + this->m_iMajorVersion = App_common::Ver_Major; + this->m_iMinorVersion = App_common::Ver_Minor; } service::~service(void) @@ -34,29 +37,29 @@ void service::Run() if (this->ctrld.begin() == 0) { - syslog << logfile::log_head << "Begin CONTROL ... OK" << endl; + syslog << logfile::log_head << "Begin CONTROLD ... OK" << endl; + + this->ctrld.StartupChild(); + + while (this->m_bIsRunning && this->ctrld.IsRunning()) + { + Sleep(100); + } + + this->ctrld.ShutdownChild(); } else { - syslog << logfile::log_head << "Begin CONTROL ... Failed" << endl; + syslog << logfile::log_head << "Begin CONTROLD ... Failed" << endl; } - this->ctrld.StartupChild(); - - while (this->m_bIsRunning && this->ctrld.IsRunning()) - { - Sleep(100); - } - - this->ctrld.ShutdownChild(); - if (this->ctrld.end() == 0) { - syslog << logfile::log_head << "End CONTROL ... OK" << endl; + syslog << logfile::log_head << "End CONTROLD ... OK" << endl; } else { - syslog << logfile::log_head << "End CONTROL ... Failed" << endl; + syslog << logfile::log_head << "End CONTROLD ... Failed" << endl; } this->ctrld.CleanupThreadPool();