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

Diff of /innwebd/innd.cpp

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

Revision 1.3 by sysadm, Fri Jul 2 11:32:20 2004 UTC Revision 1.5 by sysadm, Sat Jul 3 13:56:04 2004 UTC
# Line 14  Line 14 
14    
15  #include "StdAfx.h"  #include "StdAfx.h"
16  #include ".\innd.h"  #include ".\innd.h"
17  #include ".\nntp_active.h"  #include ".\base_active.h"
18  #include ".\App_common.h"  #include ".\App_common.h"
19    
20  using namespace std;  using namespace std;
# Line 33  int innd::Accept(void) Line 33  int innd::Accept(void)
33  {  {
34          CString out,cmd;          CString out,cmd;
35          char temp[256];          char temp[256];
36            HANDLE hThreadCurrent;
37    
38          try          try
39          {          {
40                    hThreadCurrent = GetCurrentThread();
41    
42                  out.Format("200 %s ready.",App_common::GetVersion());                  out.Format("200 %s ready.",App_common::GetVersion());
43                  this->s_send(out);                  this->s_send(out);
44                  while(!this->thread_terminate)                  while(!this->thread_terminate)
45                  {                  {
46                            this->GetParentThread()->GetThreadPool()->SetThreadStatus(hThreadCurrent,thread_pool::S_WAITING);
47    
48                          if (this->s_receive(out) == 0)  //Connection closed                          if (this->s_receive(out) == 0)  //Connection closed
49                                  break;                                  break;
50                          out.Trim();                          out.Trim();
51    
52                            this->GetParentThread()->GetThreadPool()->SetThreadStatus(hThreadCurrent,thread_pool::S_WORKING);
53    
54                          syslog << logfile::log_head << "Cmd: " << out << endl;                          syslog << logfile::log_head << "Cmd: " << out << endl;
55    
56                          if (sscanf(out,"%20s",temp) ==1)                          if (sscanf(out,"%20s",temp) ==1)
# Line 361  int innd::cmd_ihave(const char* msg_id) Line 368  int innd::cmd_ihave(const char* msg_id)
368    
369  int innd::Shutdown(void)  int innd::Shutdown(void)
370  {  {
371          nntp_active nntpClient;          base_active nntpClient;
372    
373          if (this->thread_terminate)          if (this->thread_terminate)
374                  return 1;                  return 1;


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

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