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

Diff of /innwebd/base.cpp

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

Revision 1.11 by sysadm, Wed Dec 1 08:31:52 2004 UTC Revision 1.14 by sysadm, Fri May 20 14:31:54 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 233  int base::bbs_post(const CString& head, Line 233  int base::bbs_post(const CString& head,
233                                  }                                  }
234                          }                          }
235                          if (nickname.GetLength() > 20)                          if (nickname.GetLength() > 20)
236                                  nickname = nickname.Left(20);                                  nickname = nickname.Left(19) + " ";
237    
238                          //Reference /bbs/add_sub.php                          //Reference /bbs/add_sub.php
239    
# Line 477  int base::begin(void) Line 477  int base::begin(void)
477          unsigned int time_wait = 0;          unsigned int time_wait = 0;
478    
479          if (!this->IsShutdown())          if (!this->IsShutdown())
480                  return 1;                  return 0;
481    
482          if (hThread = CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)base::Thread,(LPVOID)this,0,&ulThreadId))          if (hThread = CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)base::Thread,(LPVOID)this,0,&ulThreadId))
483          {          {
# Line 494  int base::begin(void) Line 494  int base::begin(void)
494          {          {
495          Sleep(100);          Sleep(100);
496                  time_wait += 100;                  time_wait += 100;
497                  if (time_wait > 10000) //Wait 10 seconds                  if (time_wait > 30000) //Wait 30 seconds
498                  {                  {
499                          syslog << logfile::log_head << "Module timeout in begin()" << endl;                          syslog << logfile::log_head << "Module timeout in begin()" << endl;
500                          this->end();                          this->end();
# Line 516  DWORD base::Thread(LPVOID pParam) Line 516  DWORD base::Thread(LPVOID pParam)
516    
517          p->ulMainThreadId = GetCurrentThreadId();          p->ulMainThreadId = GetCurrentThreadId();
518    
519          if (p->GetParentThread()->GetThreadPool()->AddThread(GetCurrentThreadId(), CLOCKS_PER_SEC * 30) != 0)          if (p->GetParentThread()->GetThreadPool()->AddThread(GetCurrentThreadId(), CLOCKS_PER_SEC * 60) != 0)
520          {          {
521                  syslog << logfile::log_head << "Register thread ... Failed" << endl;                  syslog << logfile::log_head << "Register thread ... Failed" << endl;
522          }          }


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

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