james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nor...@apache.org
Subject svn commit: r820718 - /james/server/trunk/pop3server-function/src/main/java/org/apache/james/pop3server/StlsCmdHandler.java
Date Thu, 01 Oct 2009 16:56:34 GMT
Author: norman
Date: Thu Oct  1 16:56:34 2009
New Revision: 820718

URL: http://svn.apache.org/viewvc?rev=820718&view=rev
Log:
Fix StlsCmdHandler

Modified:
    james/server/trunk/pop3server-function/src/main/java/org/apache/james/pop3server/StlsCmdHandler.java

Modified: james/server/trunk/pop3server-function/src/main/java/org/apache/james/pop3server/StlsCmdHandler.java
URL: http://svn.apache.org/viewvc/james/server/trunk/pop3server-function/src/main/java/org/apache/james/pop3server/StlsCmdHandler.java?rev=820718&r1=820717&r2=820718&view=diff
==============================================================================
--- james/server/trunk/pop3server-function/src/main/java/org/apache/james/pop3server/StlsCmdHandler.java
(original)
+++ james/server/trunk/pop3server-function/src/main/java/org/apache/james/pop3server/StlsCmdHandler.java
Thu Oct  1 16:56:34 2009
@@ -44,19 +44,22 @@
         if (session.isStartTLSSupported() && session.getHandlerState() == POP3Handler.AUTHENTICATION_READY
                 && session.isTLSStarted() == false) {
             response = new POP3Response(POP3Response.OK_RESPONSE,"Begin TLS negotiation");
+            session.writePOP3Response(response);
             try {
                 session.startTLS();
             } catch (IOException e) {
                 session.getLogger().info("Error while trying to secure connection", e);
 
                 // disconnect
-                session.endSession();
+                response = new POP3Response(POP3Response.ERR_RESPONSE);
+                response.setEndSession(true);
+                return response;
             }
         } else {
             response = new POP3Response(POP3Response.ERR_RESPONSE);
-
+            return response;
         }
-        return response;
+        return null;
     }
 
 



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message