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-879: It seems cyrus needs an empty initial response instead of no response.
Date Wed, 06 May 2015 21:43:30 GMT
Repository: qpid-proton
Updated Branches:
  refs/heads/master f39970691 -> cb4f9b9ff


PROTON-879: It seems cyrus needs an empty initial response instead of no
response.


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

Branch: refs/heads/master
Commit: cb4f9b9ff6f473abd0b8db9f52f59e66c3499594
Parents: f399706
Author: Andrew Stitcher <astitcher@apache.org>
Authored: Wed May 6 17:42:04 2015 -0400
Committer: Andrew Stitcher <astitcher@apache.org>
Committed: Wed May 6 17:42:04 2015 -0400

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


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/cb4f9b9f/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 a12f8c0..fbbeeb1 100644
--- a/proton-c/src/sasl/cyrus_sasl.c
+++ b/proton-c/src/sasl/cyrus_sasl.c
@@ -259,9 +259,17 @@ static int pni_wrap_server_start(pni_sasl_t *sasl, const char *mech_selected,
co
     const char *out;
     unsigned outlen;
     sasl_conn_t *cyrus_conn = (sasl_conn_t*)sasl->impl_context;
+    // If we didn't get any initial response, pretend we got an empty response as it seems
cyrus
+    // assumes this is what it will get.
+    const char *in_bytes = in->start;
+    size_t in_size = in->size;
+    if (!in_bytes) {
+        in_bytes = "";
+        in_size = 0;
+    }
     result = sasl_server_start(cyrus_conn,
                                mech_selected,
-                               in->start, in->size,
+                               in_bytes, in_size,
                                &out, &outlen);
 
     sasl->cyrus_out.start = out;


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


Mime
View raw message