--- innwebd/innd.cpp 2004/07/02 11:32:20 1.3 +++ innwebd/innd.cpp 2004/07/03 13:56:04 1.5 @@ -14,7 +14,7 @@ #include "StdAfx.h" #include ".\innd.h" -#include ".\nntp_active.h" +#include ".\base_active.h" #include ".\App_common.h" using namespace std; @@ -33,17 +33,24 @@ int innd::Accept(void) { CString out,cmd; char temp[256]; + HANDLE hThreadCurrent; try { + hThreadCurrent = GetCurrentThread(); + out.Format("200 %s ready.",App_common::GetVersion()); this->s_send(out); while(!this->thread_terminate) { + this->GetParentThread()->GetThreadPool()->SetThreadStatus(hThreadCurrent,thread_pool::S_WAITING); + if (this->s_receive(out) == 0) //Connection closed break; out.Trim(); + this->GetParentThread()->GetThreadPool()->SetThreadStatus(hThreadCurrent,thread_pool::S_WORKING); + syslog << logfile::log_head << "Cmd: " << out << endl; if (sscanf(out,"%20s",temp) ==1) @@ -361,7 +368,7 @@ int innd::cmd_ihave(const char* msg_id) int innd::Shutdown(void) { - nntp_active nntpClient; + base_active nntpClient; if (this->thread_terminate) return 1;