--- innwebd/outd.cpp 2004/07/02 11:39:07 1.1 +++ innwebd/outd.cpp 2004/07/03 13:56:04 1.3 @@ -31,7 +31,7 @@ int outd::work() { HANDLE hThreadCurrent; ULONG ulThreadId; - nntp_active* p; + base_active* p; int t_count = 0; if (this->running) @@ -43,14 +43,16 @@ int outd::work() while(!this->IsShutdown()) { - if (t_count >= 600 && nntp_active::uThreadCount == 0) + this->GetParentThread()->GetThreadPool()->SetThreadStatus(hThreadCurrent,thread_pool::S_WORKING); + + if (t_count >= 600 && base_active::uThreadCount == 0) { - p = new nntp_active(); + p = new base_active(); p->configure(this->innd_id,this->innd_name,this->innd_server,this->innd_uid,this->w_address,this->w_port,this->w_conn_str); - if (hThreadCurrent = CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)nntp_active::SendThread,(LPVOID)p,0,&ulThreadId)) + if (hThreadCurrent = CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)base_active::SendThread,(LPVOID)p,0,&ulThreadId)) { - nntp_active::uThreadCount++; + base_active::uThreadCount++; syslog << logfile::log_head << "Create send thread ... OK" << endl; } else @@ -64,7 +66,7 @@ int outd::work() t_count++; //Terminate if timeout(5 minutes) or stopped - if ((t_count >= 3000 || this->thread_terminate) && nntp_active::uThreadCount > 0) + if ((t_count >= 3000 || this->thread_terminate) && base_active::uThreadCount > 0) { if (TerminateThread(hThreadCurrent,-1)) { @@ -74,7 +76,7 @@ int outd::work() { syslog << logfile::log_head << "Terminate send thread ... Failed" << endl; } - nntp_active::uThreadCount--; + base_active::uThreadCount--; } }