diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-06-08 15:02:20 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-06-08 15:02:20 +0000 |
| commit | 9afc36152a1ce428243a3ace608d0508716a2efb (patch) | |
| tree | 2e144d04570a058f3e2716d7b98f16803392cdbe /src/HttpInitiateConnectionCommand.cc | |
| parent | 7cd9b21937c42606354610c7ae85a0857b474cf5 (diff) | |
2010-06-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Made protected member variables of Command private. Added accessor
funcs.
Diffstat (limited to 'src/HttpInitiateConnectionCommand.cc')
| -rw-r--r-- | src/HttpInitiateConnectionCommand.cc | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/src/HttpInitiateConnectionCommand.cc b/src/HttpInitiateConnectionCommand.cc index b16b9d8c..c940a071 100644 --- a/src/HttpInitiateConnectionCommand.cc +++ b/src/HttpInitiateConnectionCommand.cc @@ -77,24 +77,24 @@ Command* HttpInitiateConnectionCommand::createNextCommand proxyRequest->getHost(), proxyRequest->getPort()); std::string proxyMethod = resolveProxyMethod(req->getProtocol()); if(pooledSocket.isNull()) { - if(logger->info()) { - logger->info(MSG_CONNECTING_TO_SERVER, - util::itos(cuid).c_str(), addr.c_str(), port); + if(getLogger()->info()) { + getLogger()->info(MSG_CONNECTING_TO_SERVER, + util::itos(getCuid()).c_str(), addr.c_str(), port); } socket.reset(new SocketCore()); socket->establishConnection(addr, port); if(proxyMethod == V_TUNNEL) { HttpProxyRequestCommand* c = - new HttpProxyRequestCommand(cuid, req, _fileEntry, + new HttpProxyRequestCommand(getCuid(), req, _fileEntry, _requestGroup, e, proxyRequest, socket); c->setConnectedAddr(hostname, addr, port); command = c; } else if(proxyMethod == V_GET) { SharedHandle<HttpConnection> httpConnection - (new HttpConnection(cuid, socket, getOption().get())); - HttpRequestCommand* c = new HttpRequestCommand(cuid, req, + (new HttpConnection(getCuid(), socket, getOption().get())); + HttpRequestCommand* c = new HttpRequestCommand(getCuid(), req, _fileEntry, _requestGroup, httpConnection, e, @@ -108,8 +108,8 @@ Command* HttpInitiateConnectionCommand::createNextCommand } } else { SharedHandle<HttpConnection> httpConnection - (new HttpConnection(cuid, pooledSocket, getOption().get())); - HttpRequestCommand* c = new HttpRequestCommand(cuid, req, + (new HttpConnection(getCuid(), pooledSocket, getOption().get())); + HttpRequestCommand* c = new HttpRequestCommand(getCuid(), req, _fileEntry, _requestGroup, httpConnection, e, @@ -123,18 +123,19 @@ Command* HttpInitiateConnectionCommand::createNextCommand SharedHandle<SocketCore> pooledSocket = e->popPooledSocket(resolvedAddresses, req->getPort()); if(pooledSocket.isNull()) { - if(logger->info()) { - logger->info(MSG_CONNECTING_TO_SERVER, - util::itos(cuid).c_str(), addr.c_str(), port); + if(getLogger()->info()) { + getLogger()->info(MSG_CONNECTING_TO_SERVER, + util::itos(getCuid()).c_str(), addr.c_str(), port); } socket.reset(new SocketCore()); socket->establishConnection(addr, port); } else { socket = pooledSocket; } - SharedHandle<HttpConnection> httpConnection(new HttpConnection(cuid, socket, getOption().get())); + SharedHandle<HttpConnection> httpConnection + (new HttpConnection(getCuid(), socket, getOption().get())); HttpRequestCommand* c = - new HttpRequestCommand(cuid, req, _fileEntry, _requestGroup, + new HttpRequestCommand(getCuid(), req, _fileEntry, _requestGroup, httpConnection, e, socket); if(pooledSocket.isNull()) { c->setConnectedAddr(hostname, addr, port); |
