qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From astitc...@apache.org
Subject qpid-proton git commit: PROTON-859: Cyrus SASL pre 2.1.24 compatibility
Date Thu, 23 Apr 2015 17:06:21 GMT
Repository: qpid-proton
Updated Branches:
  refs/heads/master 74e16dfe0 -> a79ca9a6a


PROTON-859: Cyrus SASL pre 2.1.24 compatibility


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

Branch: refs/heads/master
Commit: a79ca9a6aff0b5aee4ef55e5a33f49d64f2223e1
Parents: 74e16df
Author: Andrew Stitcher <astitcher@apache.org>
Authored: Wed Apr 22 15:44:31 2015 -0400
Committer: Andrew Stitcher <astitcher@apache.org>
Committed: Thu Apr 23 13:01:54 2015 -0400

----------------------------------------------------------------------
 proton-c/src/sasl/cyrus_sasl.c | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/a79ca9a6/proton-c/src/sasl/cyrus_sasl.c
----------------------------------------------------------------------
diff --git a/proton-c/src/sasl/cyrus_sasl.c b/proton-c/src/sasl/cyrus_sasl.c
index 9e26517..8738507 100644
--- a/proton-c/src/sasl/cyrus_sasl.c
+++ b/proton-c/src/sasl/cyrus_sasl.c
@@ -28,6 +28,15 @@
 
 #include <sasl/sasl.h>
 
+// If the version of Cyrus SASL is too early for sasl_client_done()/sasl_server_done()
+// don't do any global clean up as it's not safe to use just sasl_done() for an
+// executable that uses both client and server parts of Cyrus SASL, because it can't
+// be called twice.
+#if SASL_VERSION_FULL<0x020118
+# define sasl_client_done()
+# define sasl_server_done()
+#endif
+
 enum pni_sasl_state {
   SASL_NONE,
   SASL_POSTED_INIT,


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


Mime
View raw message