Repository: qpid-proton Updated Branches: refs/heads/master 0cfa399da -> bbf8a6a30
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/master Commit: bbf8a6a3097c8e592b223d7fb8bca0b75dc6a2ef Parents: 0cfa399 Author: Andrew Stitcher <[email protected]> Authored: Tue Jan 17 16:23:22 2017 -0500 Committer: Andrew Stitcher <[email protected]> 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: [email protected] For additional commands, e-mail: [email protected]
