| 1 |
/*******************************************************/ |
/*******************************************************/ |
| 2 |
/* */ |
/* */ |
| 3 |
/* LeafOK Innd */ |
/* LeafOK Innbbsd */ |
| 4 |
/* Copyright (C) LeafOK.com, 2003-2004 */ |
/* Copyright (C) LeafOK.com, 2003-2004 */ |
| 5 |
/* */ |
/* */ |
| 6 |
/* Programmed by Leaf */ |
/* Programmed by Leaf */ |
| 7 |
/* E-mail:leaf@leafok.com QQ:6049044 */ |
/* E-mail:leaflet@leafok.com QQ:6049044 */ |
| 8 |
/* */ |
/* */ |
| 9 |
/* http://bbs.leafok.com */ |
/* http://bbs.leafok.com */ |
| 10 |
/* http://bbs.leafok.net */ |
/* http://bbs.leafok.net */ |
| 33 |
{ |
{ |
| 34 |
CString out,cmd; |
CString out,cmd; |
| 35 |
char temp[256]; |
char temp[256]; |
|
HANDLE hThreadCurrent; |
|
| 36 |
|
|
| 37 |
try |
try |
| 38 |
{ |
{ |
|
hThreadCurrent = GetCurrentThread(); |
|
|
|
|
| 39 |
out.Format("200 %s ready.",App_common::GetVersion()); |
out.Format("200 %s ready.",App_common::GetVersion()); |
| 40 |
this->s_send(out); |
this->s_send(out); |
| 41 |
while(!this->thread_terminate) |
while(!this->thread_terminate) |
| 42 |
{ |
{ |
| 43 |
this->GetParentThread()->GetThreadPool()->SetThreadStatus(hThreadCurrent,thread_pool::S_WAITING); |
this->GetParentThread()->GetThreadPool()->SetThreadStatus(GetCurrentThreadId(),thread_pool::S_WAITING); |
| 44 |
|
|
| 45 |
if (this->s_receive(out) == 0) //Connection closed |
if (this->s_receive(out) == 0) //Connection closed |
| 46 |
break; |
break; |
| 47 |
out.Trim(); |
out.Trim(); |
| 48 |
|
|
| 49 |
this->GetParentThread()->GetThreadPool()->SetThreadStatus(hThreadCurrent,thread_pool::S_WORKING); |
this->GetParentThread()->GetThreadPool()->SetThreadStatus(GetCurrentThreadId(),thread_pool::S_WORKING); |
| 50 |
|
|
| 51 |
syslog << logfile::log_head << "Cmd: " << out << endl; |
syslog << logfile::log_head << "Cmd: " << out << endl; |
| 52 |
|
|