Patch is attached.
Jordan
On 7/26/06,
Jordan Christensen <[EMAIL PROTECTED]> wrote:
Is there any way to force either the FTPSender to use passive mode? I'm sending a trying to send a file from within my firewall, and after tracing with tcpdump, its obvious that its not giving a PASV command to the target server.
This is with ServiceMix trunk.
Thanks in advance,Jordan
Index:
servicemix-components/src/main/java/org/apache/servicemix/components/net/FTPClientPool.java
===================================================================
---
servicemix-components/src/main/java/org/apache/servicemix/components/net/FTPClientPool.java
(revision 425804)
+++
servicemix-components/src/main/java/org/apache/servicemix/components/net/FTPClientPool.java
(working copy)
@@ -34,6 +34,7 @@
private String username;
private String password;
private boolean binaryMode = true;
+ private boolean passiveMode = false;
private FTPClientConfig config;
public boolean validateObject(Object object) {
@@ -82,6 +83,14 @@
this.binaryMode = binaryMode;
}
+ public boolean isPassiveMode() {
+ return passiveMode;
+ }
+
+ public void setPassiveMode(boolean passiveMode) {
+ this.passiveMode = passiveMode;
+ }
+
public FTPClientConfig getConfig() {
return config;
}
@@ -112,6 +121,9 @@
if (isBinaryMode()) {
ftp.setFileType(FTP.BINARY_FILE_TYPE);
}
+ if (isPassiveMode()) {
+ ftp.enterLocalPassiveMode();
+ }
}
protected void disconnect(SocketClient client) throws Exception {
