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

Diff of /innwebd/outd.cpp

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

Revision 1.5 by sysadm, Sun Jul 4 22:49:03 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 54  int outd::work() Line 54  int outd::work()
54                          {                          {
55                                  base_active::uThreadCount++;                                  base_active::uThreadCount++;
56                                  CloseHandle(hThreadCurrent);                                  CloseHandle(hThreadCurrent);
57                                  syslog << logfile::log_head << "Create send thread ... OK" << endl;  //                              syslog << logfile::log_head << "Create send thread ... OK" << endl;
58                          }                          }
59                          else                          else
60                          {                          {
# Line 69  int outd::work() Line 69  int outd::work()
69                  //Terminate if timeout(5 minutes) or stopped                  //Terminate if timeout(5 minutes) or stopped
70                  if ((t_count >= 3000 || this->thread_terminate) && base_active::uThreadCount > 0)                  if ((t_count >= 3000 || this->thread_terminate) && base_active::uThreadCount > 0)
71                  {                  {
72                          if (TerminateThread(hThreadCurrent,-1))                          if ((hThreadCurrent = OpenThread(THREAD_TERMINATE,FALSE,ulThreadId)) == NULL)
73                          {                          {
74                                  syslog << logfile::log_head << "Terminate send thread ... OK" << endl;                                  syslog << logfile::log_head << "Get thread handle error in outd::work()" << endl;
75                          }                          }
76                          else                          else
77                          {                          {
78                                  syslog << logfile::log_head << "Terminate send thread ... Failed" << endl;                                  if (TerminateThread(hThreadCurrent,-1))
79                                    {
80                                            syslog << logfile::log_head << "Terminate send thread ... OK" << endl;
81                                    }
82                                    else
83                                    {
84                                            syslog << logfile::log_head << "Terminate send thread ... Failed" << endl;
85                                    }
86                                    CloseHandle(hThreadCurrent);
87                          }                          }
88                          base_active::uThreadCount--;                          base_active::uThreadCount--;
89                  }                  }


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

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