/[LeafOK_CVS]/innwebd/service.cpp
ViewVC logotype

Diff of /innwebd/service.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.5 by sysadm, Tue Aug 10 19:55:57 2004 UTC Revision 1.8 by sysadm, Sat Feb 26 16:10:26 2005 UTC
# Line 1  Line 1 
1  /*******************************************************/  /*******************************************************/
2  /*                                                     */  /*                                                     */
3  /*  LeafOK Innbbsd                                     */  /*  LeafOK Innbbsd                                     */
4  /*  Copyright (C) LeafOK.com, 2003-2004                */  /*  Copyright (C) LeafOK.com, 2003-2005                */
5  /*                                                     */  /*                                                     */
6  /*  Programmed by Leaf                                 */  /*  Programmed by Leaf                                 */
7  /*  E-mail:leaflet@leafok.com  QQ:6049044              */  /*  E-mail:leaflet@leafok.com  QQ:6049044              */
# Line 31  service::~service(void) Line 31  service::~service(void)
31    
32  void service::Run()  void service::Run()
33  {  {
34            int startup_err_count = 0;
35    
36          this->ctrld.StartupDelay();          this->ctrld.StartupDelay();
37    
38          this->ctrld.InitThreadPool();          this->ctrld.InitThreadPool();
39    
40          while (this->m_bIsRunning)          while (this->m_bIsRunning)
41          {          {
42                  if (this->ctrld.begin() ==0)                  if (this->ctrld.begin() == 0)
43                  {                  {
44                          syslog << logfile::log_head << "Begin CONTROLD ... OK" << endl;                          syslog << logfile::log_head << "Begin CONTROLD ... OK" << endl;
45    
# Line 46  void service::Run() Line 48  void service::Run()
48                          break;                          break;
49                  }                  }
50                  syslog << logfile::log_head << "Begin CONTROLD ... Failed" << endl;                  syslog << logfile::log_head << "Begin CONTROLD ... Failed" << endl;
51                  Sleep(1000 * 60);  
52                    if (startup_err_count++ > 5)
53                    {
54                            this->m_bIsRunning = false;
55                            break;
56                    }
57    
58                    Sleep(1000 * 60 * 5);
59          }          }
60    
61          while (this->m_bIsRunning && this->ctrld.IsRunning())          while (this->m_bIsRunning && this->ctrld.IsRunning())


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1