Author: norman Date: Wed Feb 10 14:21:14 2010 New Revision: 908515 URL: http://svn.apache.org/viewvc?rev=908515&view=rev Log: We need to call the coreCmd on HookResultCode.OK so no other hooks will get called and the coreCmd can take care of doing all final work like adding the recipient to the recipient list etc
Modified: james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/core/AbstractHookableCmdHandler.java Modified: james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/core/AbstractHookableCmdHandler.java URL: http://svn.apache.org/viewvc/james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/core/AbstractHookableCmdHandler.java?rev=908515&r1=908514&r2=908515&view=diff ============================================================================== --- james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/core/AbstractHookableCmdHandler.java (original) +++ james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/core/AbstractHookableCmdHandler.java Wed Feb 10 14:21:14 2010 @@ -95,9 +95,15 @@ hRes = ((HookResultHook) rHook).onHookResult(session, hRes, rawHook); } } - SMTPResponse res = calcDefaultSMTPResponse(hRes); - if (res != null) { - return res; + + // call the core cmd if we receive a ok return code of the hook so no other hooks are executed + if (hRes.getResult() == HookReturnCode.OK) { + return doCoreCmd(session, command, parameters); + } else { + SMTPResponse res = calcDefaultSMTPResponse(hRes); + if (res != null) { + return res; + } } } } --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org