--- innwebd/base_passive.cpp 2004/07/04 23:35:00 1.7 +++ innwebd/base_passive.cpp 2004/09/16 15:40:37 1.8 @@ -146,7 +146,6 @@ int base_passive::work() this->GetParentThread()->GetThreadPool()->SetThreadStatus(GetCurrentThreadId(),thread_pool::S_WORKING); - strcpy(p->hostaddr,inet_ntoa(sin.sin_addr)); p->port = sin.sin_port; p->isConnected = true; @@ -160,7 +159,7 @@ int base_passive::work() continue; } - if (!p->access.get) + if (!p->check_priv()) { p->s_send("502 You are not in my access file.\r\n"); delete(p); @@ -209,6 +208,9 @@ DWORD base_passive::AcceptThread(LPVOID p->ulMainThreadId = GetCurrentThreadId(); + syslog << logfile::log_head << "Accept connection from " << p->hostaddr + << ":" << p->port << endl; + if (p->GetParentThread()->GetThreadPool()->AddThread(GetCurrentThreadId(), CLOCKS_PER_SEC * 30) != 0) { syslog << logfile::log_head << "Register thread ... Failed" << endl; @@ -250,7 +252,7 @@ int base_passive::get_priv(base_passive* //Default value strcpy(p->access.ip,p->hostaddr); p->access.control = false; - p->access.get = true; + p->access.get = false; p->access.post = false; p->access.ihave = false; @@ -354,3 +356,8 @@ int base_passive::w_call(void) this->work(); return 0; } + +bool base_passive::check_priv(void) +{ + return this->access.get; +}