james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pgoldst...@apache.org
Subject cvs commit: jakarta-james/src/java/org/apache/james/smtpserver SMTPServer.java
Date Sat, 02 Nov 2002 08:31:56 GMT
pgoldstein    2002/11/02 00:31:56

  Modified:    src/java/org/apache/james/smtpserver SMTPServer.java
  Log:
  Changing log message, adding minor validation to SMTP server code.
  
  
  Revision  Changes    Path
  1.17      +7 -2      jakarta-james/src/java/org/apache/james/smtpserver/SMTPServer.java
  
  Index: SMTPServer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/smtpserver/SMTPServer.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- SMTPServer.java	28 Oct 2002 19:38:37 -0000	1.16
  +++ SMTPServer.java	2 Nov 2002 08:31:56 -0000	1.17
  @@ -152,11 +152,16 @@
               // get the message size limit from the conf file and multiply
               // by 1024, to put it in bytes
               maxMessageSize = handlerConfiguration.getChild( "maxmessagesize" ).getValueAsLong(
maxMessageSize ) * 1024;
  -            if (getLogger().isInfoEnabled()) {
  +            if (maxMessageSize > 0) {
                   getLogger().info("The maximum allowed message size is " + maxMessageSize
+ " bytes.");
  +            } else {
  +                getLogger().info("No maximum message size is enforced for this server.");
               }
  -            //how many bytes to read before updating the timer that data is being transfered
  +            // How many bytes to read before updating the timer that data is being transfered
               lengthReset = configuration.getChild("lengthReset").getValueAsInteger(lengthReset);
  +            if (lengthReset <= 0) {
  +                throw new ConfigurationException("The configured value for the idle timeout
reset, " + lengthReset + ", is not valid.");
  +            }
               if (getLogger().isInfoEnabled()) {
                   getLogger().info("The idle timeout will be reset every " + lengthReset
+ " bytes.");
               }
  
  
  

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


Mime
View raw message