summaryrefslogtreecommitdiff
path: root/src/FtpInitiateConnectionCommand.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-01-05 16:01:46 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-01-05 16:01:46 +0000
commit4db349c1f32b4a313d12d114137432441633d00a (patch)
tree417451971e264834312cfd8339c79930d680a5d1 /src/FtpInitiateConnectionCommand.cc
parent338e8aca09331d3e7fa4e1e8e1f9d10260986772 (diff)
2010-01-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Untabify. Fixed one line in copyright which is longer than 80 columns. * src * test
Diffstat (limited to 'src/FtpInitiateConnectionCommand.cc')
-rw-r--r--src/FtpInitiateConnectionCommand.cc86
1 files changed, 43 insertions, 43 deletions
diff --git a/src/FtpInitiateConnectionCommand.cc b/src/FtpInitiateConnectionCommand.cc
index c2293204..8ef6fc67 100644
--- a/src/FtpInitiateConnectionCommand.cc
+++ b/src/FtpInitiateConnectionCommand.cc
@@ -16,7 +16,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* In addition, as a special exception, the copyright holders give
* permission to link the code of portions of this program with the
@@ -81,49 +81,49 @@ Command* FtpInitiateConnectionCommand::createNextCommand
socket->establishConnection(addr, port);
if(proxyMethod == V_GET) {
- // Use GET for FTP via HTTP proxy.
- req->setMethod(Request::METHOD_GET);
- SharedHandle<HttpConnection> hc
- (new HttpConnection(cuid, socket, getOption().get()));
-
- HttpRequestCommand* c =
- new HttpRequestCommand(cuid, req, _fileEntry,
- _requestGroup, hc, e, socket);
- c->setConnectedAddr(hostname, addr, port);
- c->setProxyRequest(proxyRequest);
- command = c;
+ // Use GET for FTP via HTTP proxy.
+ req->setMethod(Request::METHOD_GET);
+ SharedHandle<HttpConnection> hc
+ (new HttpConnection(cuid, socket, getOption().get()));
+
+ HttpRequestCommand* c =
+ new HttpRequestCommand(cuid, req, _fileEntry,
+ _requestGroup, hc, e, socket);
+ c->setConnectedAddr(hostname, addr, port);
+ c->setProxyRequest(proxyRequest);
+ command = c;
} else if(proxyMethod == V_TUNNEL) {
- FtpTunnelRequestCommand* c =
- new FtpTunnelRequestCommand(cuid, req, _fileEntry,
- _requestGroup, e,
- proxyRequest, socket);
- c->setConnectedAddr(hostname, addr, port);
- command = c;
+ FtpTunnelRequestCommand* c =
+ new FtpTunnelRequestCommand(cuid, req, _fileEntry,
+ _requestGroup, e,
+ proxyRequest, socket);
+ c->setConnectedAddr(hostname, addr, port);
+ command = c;
} else {
- // TODO
- throw DL_ABORT_EX("ERROR");
+ // TODO
+ throw DL_ABORT_EX("ERROR");
}
} else {
if(proxyMethod == V_TUNNEL) {
- command =
- new FtpNegotiationCommand(cuid, req, _fileEntry,
- _requestGroup, e, pooledSocket,
- FtpNegotiationCommand::SEQ_SEND_CWD,
- options["baseWorkingDir"]);
+ command =
+ new FtpNegotiationCommand(cuid, req, _fileEntry,
+ _requestGroup, e, pooledSocket,
+ FtpNegotiationCommand::SEQ_SEND_CWD,
+ options["baseWorkingDir"]);
} else if(proxyMethod == V_GET) {
- // Use GET for FTP via HTTP proxy.
- req->setMethod(Request::METHOD_GET);
- SharedHandle<HttpConnection> hc
- (new HttpConnection(cuid, pooledSocket, getOption().get()));
-
- HttpRequestCommand* c =
- new HttpRequestCommand(cuid, req, _fileEntry,
- _requestGroup, hc, e, pooledSocket);
- c->setProxyRequest(proxyRequest);
- command = c;
+ // Use GET for FTP via HTTP proxy.
+ req->setMethod(Request::METHOD_GET);
+ SharedHandle<HttpConnection> hc
+ (new HttpConnection(cuid, pooledSocket, getOption().get()));
+
+ HttpRequestCommand* c =
+ new HttpRequestCommand(cuid, req, _fileEntry,
+ _requestGroup, hc, e, pooledSocket);
+ c->setProxyRequest(proxyRequest);
+ command = c;
} else {
- // TODO
- throw DL_ABORT_EX("ERROR");
+ // TODO
+ throw DL_ABORT_EX("ERROR");
}
}
} else {
@@ -135,16 +135,16 @@ Command* FtpInitiateConnectionCommand::createNextCommand
socket.reset(new SocketCore());
socket->establishConnection(addr, port);
FtpNegotiationCommand* c =
- new FtpNegotiationCommand(cuid, req, _fileEntry,
- _requestGroup, e, socket);
+ new FtpNegotiationCommand(cuid, req, _fileEntry,
+ _requestGroup, e, socket);
c->setConnectedAddr(hostname, addr, port);
command = c;
} else {
command =
- new FtpNegotiationCommand(cuid, req, _fileEntry,
- _requestGroup, e, pooledSocket,
- FtpNegotiationCommand::SEQ_SEND_CWD,
- options["baseWorkingDir"]);
+ new FtpNegotiationCommand(cuid, req, _fileEntry,
+ _requestGroup, e, pooledSocket,
+ FtpNegotiationCommand::SEQ_SEND_CWD,
+ options["baseWorkingDir"]);
}
}
return command;