You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2017/01/18 01:16:21 UTC
[05/10] qpid-proton git commit: PROTON-1388: Make sure we switch to
sasl encrypted input early enough - Previously if the server sent an outcome
frame followed immediately by encrypted AMQP frames we wouldn't always switch
to reading encrypted AMQP fra
PROTON-1388: Make sure we switch to sasl encrypted input early enough
- Previously if the server sent an outcome frame followed immediately by encrypted
AMQP frames we wouldn't always switch to reading encrypted AMQP frames early enough.
Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/bbf8a6a3
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/bbf8a6a3
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/bbf8a6a3
Branch: refs/heads/go1
Commit: bbf8a6a3097c8e592b223d7fb8bca0b75dc6a2ef
Parents: 0cfa399
Author: Andrew Stitcher <as...@apache.org>
Authored: Tue Jan 17 16:23:22 2017 -0500
Committer: Andrew Stitcher <as...@apache.org>
Committed: Tue Jan 17 16:23:22 2017 -0500
----------------------------------------------------------------------
proton-c/src/sasl/sasl.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/bbf8a6a3/proton-c/src/sasl/sasl.c
----------------------------------------------------------------------
diff --git a/proton-c/src/sasl/sasl.c b/proton-c/src/sasl/sasl.c
index 69fb6b2..12b6ad0 100644
--- a/proton-c/src/sasl/sasl.c
+++ b/proton-c/src/sasl/sasl.c
@@ -120,7 +120,9 @@ static bool pni_sasl_is_final_input_state(pni_sasl_t *sasl)
static bool pni_sasl_is_final_output_state(pni_sasl_t *sasl)
{
enum pni_sasl_state last_state = sasl->last_state;
- return last_state==SASL_RECVED_OUTCOME_SUCCEED
+ enum pni_sasl_state desired_state = sasl->desired_state;
+ return (desired_state==SASL_RECVED_OUTCOME_SUCCEED && last_state>=SASL_POSTED_INIT)
+ || last_state==SASL_RECVED_OUTCOME_SUCCEED
|| last_state==SASL_RECVED_OUTCOME_FAIL
|| last_state==SASL_ERROR
|| last_state==SASL_POSTED_OUTCOME;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org