incubator-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ran...@apache.org
Subject cvs commit: incubator-ftpserver/src/java/org/apache/ftpserver FtpDataConnection.java
Date Thu, 06 Oct 2005 05:56:51 GMT
rana_b      2005/10/05 22:56:51

  Modified:    src/java/org/apache/ftpserver FtpDataConnection.java
  Log:
  commons-logging used
  
  Revision  Changes    Path
  1.8       +10 -6     incubator-ftpserver/src/java/org/apache/ftpserver/FtpDataConnection.java
  
  Index: FtpDataConnection.java
  ===================================================================
  RCS file: /home/cvs/incubator-ftpserver/src/java/org/apache/ftpserver/FtpDataConnection.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- FtpDataConnection.java	4 Oct 2005 07:28:02 -0000	1.7
  +++ FtpDataConnection.java	6 Oct 2005 05:56:51 -0000	1.8
  @@ -20,6 +20,7 @@
   import java.net.ServerSocket;
   import java.net.Socket;
   
  +import org.apache.commons.logging.Log;
   import org.apache.ftpserver.ftplet.FtpException;
   import org.apache.ftpserver.interfaces.IFtpConfig;
   import org.apache.ftpserver.interfaces.ISsl;
  @@ -34,6 +35,8 @@
   public
   class FtpDataConnection {
       
  +    private Log m_log;
  +    
       private IFtpConfig    m_fconfig;
       private Socket        m_dataSoc;
       private ServerSocket  m_servSoc;
  @@ -55,6 +58,7 @@
        */
       public void setFtpConfig(IFtpConfig cfg) {
           m_fconfig = cfg;
  +        m_log = m_fconfig.getLogFactory().getInstance(getClass());
       }
       
       /**
  @@ -68,7 +72,7 @@
                   m_dataSoc.close(); 
               } 
               catch(Exception ex) {
  -                m_fconfig.getLogger().warn("FtpDataConnection.closeDataSocket()", ex);
  +                m_log.warn("FtpDataConnection.closeDataSocket()", ex);
               }
               m_dataSoc = null;
           }
  @@ -79,7 +83,7 @@
                  m_servSoc.close();
               }
               catch(Exception ex) {
  -                m_fconfig.getLogger().warn("FtpDataConnection.closeDataSocket()", ex);
  +                m_log.warn("FtpDataConnection.closeDataSocket()", ex);
               }
               m_fconfig.getDataConnectionConfig().releasePassivePort(m_port);
               m_servSoc = null;
  @@ -116,7 +120,7 @@
           // get the passive port
           int port = m_fconfig.getDataConnectionConfig().getPassivePort();
           if(port == -1) {
  -            m_fconfig.getLogger().warn("Cannot find an available passive port.");
  +            m_log.warn("Cannot find an available passive port.");
               m_servSoc = null;
               return false;
           }
  @@ -145,7 +149,7 @@
           }
           catch(Exception ex) {
               m_servSoc = null;
  -            m_fconfig.getLogger().warn("FtpDataConnection.setPasvCommand()", ex);
  +            m_log.warn("FtpDataConnection.setPasvCommand()", ex);
           }
           return bRet;
       }
  @@ -189,7 +193,7 @@
               }
           }
           catch(Exception ex) {
  -            m_fconfig.getLogger().warn("FtpDataConnection.getDataSocket()", ex);
  +            m_log.warn("FtpDataConnection.getDataSocket()", ex);
           }
           
           return m_dataSoc;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@incubator.apache.org
For additional commands, e-mail: cvs-help@incubator.apache.org


Mime
View raw message