qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject [30/50] qpid-proton git commit: wired in allowSkip
Date Thu, 09 Jul 2015 22:12:10 GMT
wired in allowSkip


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/940d843f
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/940d843f
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/940d843f

Branch: refs/heads/cjansen-cpp-client
Commit: 940d843f36cb4cceb7f2a6bde8c5b78247392384
Parents: 1d8a0a4
Author: Rafael Schloming <rhs@alum.mit.edu>
Authored: Mon Jul 6 11:19:30 2015 -0400
Committer: Rafael Schloming <rhs@alum.mit.edu>
Committed: Mon Jul 6 11:19:30 2015 -0400

----------------------------------------------------------------------
 .../main/java/org/apache/qpid/proton/engine/impl/SaslImpl.java | 6 +++---
 proton-j/src/main/resources/csasl.py                           | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/940d843f/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/SaslImpl.java
----------------------------------------------------------------------
diff --git a/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/SaslImpl.java b/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/SaslImpl.java
index 6efb140..dc731dc 100644
--- a/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/SaslImpl.java
+++ b/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/SaslImpl.java
@@ -83,6 +83,7 @@ public class SaslImpl implements Sasl, SaslFrameBody.SaslFrameBodyHandler<Void>,
     private Symbol _chosenMechanism;
 
     private Role _role;
+    private boolean _allowSkip = true;
 
     /**
      * @param maxFrameSize the size of the input and output buffers
@@ -479,8 +480,7 @@ public class SaslImpl implements Sasl, SaslFrameBody.SaslFrameBodyHandler<Void>,
     @Override
     public void allowSkip(boolean allowSkip)
     {
-        //TODO: implement
-        throw new ProtonUnsupportedOperationException();
+        _allowSkip = allowSkip;
     }
 
     public TransportWrapper wrap(final TransportInput input, final TransportOutput output)
@@ -488,7 +488,7 @@ public class SaslImpl implements Sasl, SaslFrameBody.SaslFrameBodyHandler<Void>,
         return new SaslSniffer(new SaslTransportWrapper(input, output),
                                new PlainTransportWrapper(output, input)) {
             protected boolean isDeterminationMade() {
-                if (_role == Role.SERVER) {
+                if (_role == Role.SERVER && _allowSkip) {
                     return super.isDeterminationMade();
                 } else {
                     _selectedTransportWrapper = _wrapper1;

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/940d843f/proton-j/src/main/resources/csasl.py
----------------------------------------------------------------------
diff --git a/proton-j/src/main/resources/csasl.py b/proton-j/src/main/resources/csasl.py
index 5188f11..a5fe0a6 100644
--- a/proton-j/src/main/resources/csasl.py
+++ b/proton-j/src/main/resources/csasl.py
@@ -60,7 +60,7 @@ SASL_OUTCOMES_J2P = {
 }
 
 def pn_transport_require_auth(transport, require):
-  transport.impl.sasl().allowSkip(not require)
+  raise Skipped('Not supported in Proton-J')
 
 # TODO: Placeholders
 def pn_transport_is_authenticated(transport):


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message