james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nor...@apache.org
Subject svn commit: r804295 - in /james/server/sandbox/active/smtp_refactor/smtpserver-function/src/main/java/org/apache/james/smtpserver/core: AbstractHookableCmdHandler.java MailCmdHandler.java
Date Fri, 14 Aug 2009 16:55:34 GMT
Author: norman
Date: Fri Aug 14 16:55:34 2009
New Revision: 804295

URL: http://svn.apache.org/viewvc?rev=804295&view=rev
Log:
Cleanup session map on failure

Modified:
    james/server/sandbox/active/smtp_refactor/smtpserver-function/src/main/java/org/apache/james/smtpserver/core/AbstractHookableCmdHandler.java
    james/server/sandbox/active/smtp_refactor/smtpserver-function/src/main/java/org/apache/james/smtpserver/core/MailCmdHandler.java

Modified: james/server/sandbox/active/smtp_refactor/smtpserver-function/src/main/java/org/apache/james/smtpserver/core/AbstractHookableCmdHandler.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/active/smtp_refactor/smtpserver-function/src/main/java/org/apache/james/smtpserver/core/AbstractHookableCmdHandler.java?rev=804295&r1=804294&r2=804295&view=diff
==============================================================================
--- james/server/sandbox/active/smtp_refactor/smtpserver-function/src/main/java/org/apache/james/smtpserver/core/AbstractHookableCmdHandler.java
(original)
+++ james/server/sandbox/active/smtp_refactor/smtpserver-function/src/main/java/org/apache/james/smtpserver/core/AbstractHookableCmdHandler.java
Fri Aug 14 16:55:34 2009
@@ -177,6 +177,7 @@
      */
     protected abstract SMTPResponse doCoreCmd(SMTPSession session,
             String command, String parameters);
+    
 
     /**
      * @see org.apache.james.smtpserver.ExtensibleHandler#getMarkerInterfaces()

Modified: james/server/sandbox/active/smtp_refactor/smtpserver-function/src/main/java/org/apache/james/smtpserver/core/MailCmdHandler.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/active/smtp_refactor/smtpserver-function/src/main/java/org/apache/james/smtpserver/core/MailCmdHandler.java?rev=804295&r1=804294&r2=804295&view=diff
==============================================================================
--- james/server/sandbox/active/smtp_refactor/smtpserver-function/src/main/java/org/apache/james/smtpserver/core/MailCmdHandler.java
(original)
+++ james/server/sandbox/active/smtp_refactor/smtpserver-function/src/main/java/org/apache/james/smtpserver/core/MailCmdHandler.java
Fri Aug 14 16:55:34 2009
@@ -48,9 +48,23 @@
      * A map of parameterHooks
      */
     private Map paramHooks;
-                                                            // message
 
-    /**
+    
+    
+    @Override
+	public SMTPResponse onCommand(SMTPSession session, String command,
+			String parameters) {
+		SMTPResponse response =  super.onCommand(session, command, parameters);
+		// Check if the response was not ok 
+		if (response.getRetCode().equals(SMTPRetCode.MAIL_OK) == false) {
+			// cleanup the session
+			session.getState().remove(SMTPSession.SENDER);
+		}
+		
+		return response;
+	}
+
+	/**
      * Handler method called upon receipt of a MAIL command. Sets up handler to
      * deliver mail as the stated sender.
      * 



---------------------------------------------------------------------
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