adammurdoch    2003/03/13 19:47:10

  Modified:    vfs/src/java/org/apache/commons/vfs/provider/ftp
                        FtpFileSystem.java
  Log:
  Was ignoring non-default port.
  
  Revision  Changes    Path
  1.20      +5 -5      
jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/ftp/FtpFileSystem.java
  
  Index: FtpFileSystem.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/ftp/FtpFileSystem.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- FtpFileSystem.java        14 Mar 2003 01:08:09 -0000      1.19
  +++ FtpFileSystem.java        14 Mar 2003 03:47:09 -0000      1.20
  @@ -77,6 +77,7 @@
       extends AbstractFileSystem
   {
       private final String hostname;
  +    private final int port;
       private final String username;
       private final String password;
   
  @@ -87,6 +88,7 @@
       {
           super( rootName, null );
           hostname = rootName.getHostName();
  +        port = rootName.getPort();
   
           // Determine the username and password to use
           if ( rootName.getUserName() == null )
  @@ -159,7 +161,7 @@
       {
           if ( idleClient == null )
           {
  -            return createConnection( hostname, username, password );
  +            return createConnection();
           }
           else
           {
  @@ -198,9 +200,7 @@
       /**
        * Creates a new connection to the server.
        */
  -    private FTPClient createConnection( final String hostname,
  -                                        final String username,
  -                                        final String password )
  +    private FTPClient createConnection()
           throws FileSystemException
       {
           try
  @@ -209,7 +209,7 @@
   
               try
               {
  -                client.connect( hostname );
  +                client.connect( hostname, port );
   
                   int reply = client.getReplyCode();
                   if ( !FTPReply.isPositiveCompletion( reply ) )
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to