Repository: qpid-proton
Updated Branches:
  refs/heads/0.10.x b7a1fe9ac -> 54d4c098d


Fix to PROTON-963: Don't hang if Cyrus SASL detects "no worthy mech"


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

Branch: refs/heads/0.10.x
Commit: 134a3c53008fe6bc9fb8eeed9a7001af7a6f1412
Parents: b7a1fe9
Author: Andrew Stitcher <[email protected]>
Authored: Tue Aug 4 02:11:04 2015 -0400
Committer: Andrew Stitcher <[email protected]>
Committed: Tue Aug 4 12:25:07 2015 -0400

----------------------------------------------------------------------
 proton-c/src/sasl/sasl.c          |  2 +-
 tests/python/proton_tests/sasl.py | 12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/134a3c53/proton-c/src/sasl/sasl.c
----------------------------------------------------------------------
diff --git a/proton-c/src/sasl/sasl.c b/proton-c/src/sasl/sasl.c
index 7535306..a01cce5 100644
--- a/proton-c/src/sasl/sasl.c
+++ b/proton-c/src/sasl/sasl.c
@@ -688,7 +688,7 @@ int pn_do_mechanisms(pn_transport_t *transport, uint8_t 
frame_type, uint16_t cha
     pni_sasl_set_desired_state(transport, SASL_POSTED_INIT);
   } else {
     sasl->outcome = PN_SASL_PERM;
-    pni_sasl_set_desired_state(transport, SASL_ERROR);
+    pni_sasl_set_desired_state(transport, SASL_RECVED_OUTCOME);
   }
 
   pn_free(mechs);

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/134a3c53/tests/python/proton_tests/sasl.py
----------------------------------------------------------------------
diff --git a/tests/python/proton_tests/sasl.py 
b/tests/python/proton_tests/sasl.py
index 248900c..df2910a 100644
--- a/tests/python/proton_tests/sasl.py
+++ b/tests/python/proton_tests/sasl.py
@@ -542,8 +542,8 @@ class SASLEventTest(engine.CollectorTest):
     _testSaslMech(self, 'DIGEST-MD5', authenticated=False)
     self.expect(Event.CONNECTION_INIT, Event.CONNECTION_BOUND,
                 Event.CONNECTION_LOCAL_OPEN, Event.TRANSPORT,
-                Event.TRANSPORT_HEAD_CLOSED, Event.TRANSPORT_TAIL_CLOSED, 
Event.TRANSPORT_CLOSED,
-                Event.TRANSPORT_ERROR)
+                Event.TRANSPORT_ERROR,
+                Event.TRANSPORT_TAIL_CLOSED, Event.TRANSPORT_HEAD_CLOSED, 
Event.TRANSPORT_CLOSED)
 
   def testNoMechServer(self):
     common.ensureCanTestExtendedSASL()
@@ -564,8 +564,8 @@ class SASLEventTest(engine.CollectorTest):
     _testSaslMech(self, 'IMPOSSIBLE', authenticated=False)
     self.expect(Event.CONNECTION_INIT, Event.CONNECTION_BOUND,
                 Event.CONNECTION_LOCAL_OPEN, Event.TRANSPORT,
-                Event.TRANSPORT_HEAD_CLOSED, Event.TRANSPORT_TAIL_CLOSED, 
Event.TRANSPORT_CLOSED,
-                Event.TRANSPORT_ERROR)
+                Event.TRANSPORT_ERROR,
+                Event.TRANSPORT_TAIL_CLOSED, Event.TRANSPORT_HEAD_CLOSED, 
Event.TRANSPORT_CLOSED)
 
   def testDisallowedMechServer(self):
     self.c2.collect(self.collector)
@@ -584,8 +584,8 @@ class SASLEventTest(engine.CollectorTest):
     _testSaslMech(self, 'PLAIN', authenticated=False)
     self.expect(Event.CONNECTION_INIT, Event.CONNECTION_BOUND,
                 Event.CONNECTION_LOCAL_OPEN, Event.TRANSPORT,
-                Event.TRANSPORT_HEAD_CLOSED, Event.TRANSPORT_TAIL_CLOSED, 
Event.TRANSPORT_CLOSED,
-                Event.TRANSPORT_ERROR)
+                Event.TRANSPORT_ERROR,
+                Event.TRANSPORT_TAIL_CLOSED, Event.TRANSPORT_HEAD_CLOSED, 
Event.TRANSPORT_CLOSED)
 
   def testDisallowedPlainServer(self):
     self.c2.collect(self.collector)


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to