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

Diff of /innwebd/controld.cpp

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

Revision 1.4 by sysadm, Sat Jul 3 13:56:04 2004 UTC Revision 1.5 by sysadm, Sat Jul 3 15:10:23 2004 UTC
# Line 379  int controld::load_conf(const char* conf Line 379  int controld::load_conf(const char* conf
379          this->innd.configure(innd_id,innd_name,innd_server,innd_uid,innd_address,innd_port,conn_str);          this->innd.configure(innd_id,innd_name,innd_server,innd_uid,innd_address,innd_port,conn_str);
380          this->outd.configure(innd_id,innd_name,innd_server,innd_uid,innd_address,0,conn_str);          this->outd.configure(innd_id,innd_name,innd_server,innd_uid,innd_address,0,conn_str);
381    
         base* p_ParentThread;  
   
         p_ParentThread = new base_active();  
   
         this->SetParentThread(p_ParentThread);  
         this->bbsd.SetParentThread(p_ParentThread);  
         this->innd.SetParentThread(p_ParentThread);  
         this->outd.SetParentThread(p_ParentThread);  
   
         p_ParentThread->SetThreadPool(new thread_pool(TS_MAX_THREAD));  
   
         if (p_ParentThread->GetThreadPool()->GetLastError() != 0)  
         {  
                 syslog << logfile::log_head << "Create Thread Pool ... failed" << endl;  
         }  
   
382          return 0;          return 0;
383  }  }
384    
# Line 471  void controld::ShutdownChild(void) Line 455  void controld::ShutdownChild(void)
455                  syslog << logfile::log_head << "End OUTD ... Failed" << endl;                  syslog << logfile::log_head << "End OUTD ... Failed" << endl;
456          }          }
457  }  }
458    
459    int controld::InitThreadPool(void)
460    {
461            base* p_ParentThread;
462    
463            p_ParentThread = new controld();
464    
465            this->SetParentThread(p_ParentThread);
466            this->bbsd.SetParentThread(p_ParentThread);
467            this->innd.SetParentThread(p_ParentThread);
468            this->outd.SetParentThread(p_ParentThread);
469    
470            p_ParentThread->SetThreadPool(new thread_pool(TS_MAX_THREAD));
471    
472            if (p_ParentThread->GetThreadPool()->GetLastError() != 0)
473            {
474                    syslog << logfile::log_head << "Create Thread Pool ... failed" << endl;
475            }
476    
477            return 0;
478    }
479    
480    int controld::CleanupThreadPool(void)
481    {
482            delete(this->GetParentThread());
483    
484            return 0;
485    }


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

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