avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ran...@apache.org
Subject cvs commit: jakarta-avalon-apps/ftpserver/src/java/org/apache/avalon/ftpserver/ip AbstractIpRestrictor.java
Date Sun, 07 Apr 2002 17:02:23 GMT
rana_b      02/04/07 10:02:23

  Modified:    ftpserver/src/java/org/apache/avalon/ftpserver/ip
                        AbstractIpRestrictor.java
  Log:
  allow/ban IP
  
  Revision  Changes    Path
  1.2       +17 -2     jakarta-avalon-apps/ftpserver/src/java/org/apache/avalon/ftpserver/ip/AbstractIpRestrictor.java
  
  Index: AbstractIpRestrictor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/ftpserver/src/java/org/apache/avalon/ftpserver/ip/AbstractIpRestrictor.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AbstractIpRestrictor.java	31 Mar 2002 16:47:34 -0000	1.1
  +++ AbstractIpRestrictor.java	7 Apr 2002 17:02:23 -0000	1.2
  @@ -47,6 +47,7 @@
       protected Configuration mConfig;
       protected BlockContext mBlockContext;
       protected ComponentManager mComponentManager;
  +    protected boolean mbAllowIp;
   
       /**
        * Set context object - first step.
  @@ -82,9 +83,23 @@
        * Configure user manager - third step.
        */
       public void configure(Configuration config) throws ConfigurationException {
  -        mConfig = config;
  +        mConfig = config;       
  +
  +        // get server address        
  +        Configuration tmpConf = mConfig.getChild("allow-ip", false); 
  +        mbAllowIp = false;       
  +        if(tmpConf != null) {
  +            mbAllowIp = tmpConf.getValueAsBoolean(mbAllowIp);
  +        } 
  +    }
  +     
  +    /**
  +     * Get allow/ban IP flag.
  +     */
  +    public boolean isAllowIp() {
  +        return mbAllowIp;
       }
  -        
  +   
       /**
        * Get config object.
        */
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message