2009-05-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Log incoming host in HttpListenCommand.
	* src/HttpListenCommand.cc
pull/1/head
Tatsuhiro Tsujikawa 2009-05-09 15:55:52 +00:00
parent 7aefbb7338
commit 02de210544
2 changed files with 12 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2009-05-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Log incoming host in HttpListenCommand.
* src/HttpListenCommand.cc
2009-05-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added BASIC authentication for XML-RPC. Added --xml-rpc-user and

View File

@ -63,6 +63,13 @@ bool HttpListenCommand::execute()
if(_serverSocket->isReadable(0)) {
SharedHandle<SocketCore> socket(_serverSocket->acceptConnection());
socket->setNonBlockingMode();
std::pair<std::string, uint16_t> peerInfo;
socket->getPeerInfo(peerInfo);
logger->info("XML-RPC: Accepted the connection from %s:%u.",
peerInfo.first.c_str(), peerInfo.second);
HttpServerCommand* c =
new HttpServerCommand(_e->newCUID(), _e, socket);
c->setStatus(Command::STATUS_ONESHOT_REALTIME);