|
@@ -132,6 +132,7 @@ std::unique_ptr<Command> FtpInitiateConnectionCommand::createNextCommandProxied
|
|
|
|
|
|
setConnectedAddrInfo(getRequest(), hostname, pooledSocket);
|
|
setConnectedAddrInfo(getRequest(), hostname, pooledSocket);
|
|
if(proxyMethod == V_TUNNEL) {
|
|
if(proxyMethod == V_TUNNEL) {
|
|
|
|
+#ifdef HAVE_LIBSSH2
|
|
if (getRequest()->getProtocol() == "sftp") {
|
|
if (getRequest()->getProtocol() == "sftp") {
|
|
return make_unique<SftpNegotiationCommand>
|
|
return make_unique<SftpNegotiationCommand>
|
|
(getCuid(),
|
|
(getCuid(),
|
|
@@ -142,6 +143,7 @@ std::unique_ptr<Command> FtpInitiateConnectionCommand::createNextCommandProxied
|
|
pooledSocket,
|
|
pooledSocket,
|
|
SftpNegotiationCommand::SEQ_SFTP_OPEN);
|
|
SftpNegotiationCommand::SEQ_SFTP_OPEN);
|
|
}
|
|
}
|
|
|
|
+#endif // HAVE_LIBSSH2
|
|
|
|
|
|
// options contains "baseWorkingDir"
|
|
// options contains "baseWorkingDir"
|
|
return make_unique<FtpNegotiationCommand>
|
|
return make_unique<FtpNegotiationCommand>
|
|
@@ -206,7 +208,11 @@ std::unique_ptr<Command> FtpInitiateConnectionCommand::createNextCommandPlain
|
|
getSocket());
|
|
getSocket());
|
|
|
|
|
|
if(getRequest()->getProtocol() == "sftp") {
|
|
if(getRequest()->getProtocol() == "sftp") {
|
|
|
|
+#ifdef HAVE_LIBSSH2
|
|
c->setControlChain(std::make_shared<SftpNegotiationConnectChain>());
|
|
c->setControlChain(std::make_shared<SftpNegotiationConnectChain>());
|
|
|
|
+#else // !HAVE_LIBSSH2
|
|
|
|
+ assert(0);
|
|
|
|
+#endif // !HAVE_LIBSSH2
|
|
} else {
|
|
} else {
|
|
c->setControlChain(std::make_shared<FtpNegotiationConnectChain>());
|
|
c->setControlChain(std::make_shared<FtpNegotiationConnectChain>());
|
|
}
|
|
}
|
|
@@ -216,6 +222,7 @@ std::unique_ptr<Command> FtpInitiateConnectionCommand::createNextCommandPlain
|
|
|
|
|
|
setConnectedAddrInfo(getRequest(), hostname, pooledSocket);
|
|
setConnectedAddrInfo(getRequest(), hostname, pooledSocket);
|
|
|
|
|
|
|
|
+#ifdef HAVE_LIBSSH2
|
|
if (getRequest()->getProtocol() == "sftp") {
|
|
if (getRequest()->getProtocol() == "sftp") {
|
|
return make_unique<SftpNegotiationCommand>
|
|
return make_unique<SftpNegotiationCommand>
|
|
(getCuid(),
|
|
(getCuid(),
|
|
@@ -226,6 +233,7 @@ std::unique_ptr<Command> FtpInitiateConnectionCommand::createNextCommandPlain
|
|
pooledSocket,
|
|
pooledSocket,
|
|
SftpNegotiationCommand::SEQ_SFTP_OPEN);
|
|
SftpNegotiationCommand::SEQ_SFTP_OPEN);
|
|
}
|
|
}
|
|
|
|
+#endif // HAVE_LIBSSH2
|
|
|
|
|
|
// options contains "baseWorkingDir"
|
|
// options contains "baseWorkingDir"
|
|
return make_unique<FtpNegotiationCommand>
|
|
return make_unique<FtpNegotiationCommand>
|