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-877: Finished moving all outcome processing to output side - Also removed now unused halt boolean
Date Tue, 12 May 2015 21:05:22 GMT
Repository: qpid-proton
Updated Branches:
  refs/heads/master 890050048 -> 460c78700


PROTON-877: Finished moving all outcome processing to output side
- Also removed now unused halt boolean


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

Branch: refs/heads/master
Commit: 460c78700acdb7f5c0bc516bb57b94d496614958
Parents: 8900500
Author: Andrew Stitcher <astitcher@apache.org>
Authored: Tue May 12 15:39:08 2015 -0400
Committer: Andrew Stitcher <astitcher@apache.org>
Committed: Tue May 12 15:39:08 2015 -0400

----------------------------------------------------------------------
 proton-c/src/sasl/cyrus_sasl.c    | 6 +++---
 proton-c/src/sasl/sasl-internal.h | 1 -
 proton-c/src/sasl/sasl.c          | 9 ++++-----
 3 files changed, 7 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/460c7870/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 1b3caf0..4add4ad 100644
--- a/proton-c/src/sasl/cyrus_sasl.c
+++ b/proton-c/src/sasl/cyrus_sasl.c
@@ -209,9 +209,9 @@ void pni_process_challenge(pn_transport_t *transport, const pn_bytes_t
*recv)
         default:
             pni_check_sasl_result(cyrus_conn, result, transport);
 
-            // Failed somehow
-            sasl->halt = true;
-            pn_transport_close_tail(transport);
+            // Failed somehow - equivalent to failing authentication
+            sasl->outcome = PN_SASL_AUTH;
+            pni_sasl_set_desired_state(transport, SASL_RECVED_OUTCOME);
             break;
     }
 }

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/460c7870/proton-c/src/sasl/sasl-internal.h
----------------------------------------------------------------------
diff --git a/proton-c/src/sasl/sasl-internal.h b/proton-c/src/sasl/sasl-internal.h
index 956d4af..da180e4 100644
--- a/proton-c/src/sasl/sasl-internal.h
+++ b/proton-c/src/sasl/sasl-internal.h
@@ -70,7 +70,6 @@ struct pni_sasl_t {
   bool client;
   bool input_bypass;
   bool output_bypass;
-  bool halt;
 };
 
 void pni_split_mechs(char *mechlist, const char* included_mechs, char *mechs[], int *count);

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/460c7870/proton-c/src/sasl/sasl.c
----------------------------------------------------------------------
diff --git a/proton-c/src/sasl/sasl.c b/proton-c/src/sasl/sasl.c
index f32e255..c425490 100644
--- a/proton-c/src/sasl/sasl.c
+++ b/proton-c/src/sasl/sasl.c
@@ -375,7 +375,6 @@ pn_sasl_t *pn_sasl(pn_transport_t *transport)
     sasl->last_state = SASL_NONE;
     sasl->input_bypass = false;
     sasl->output_bypass = false;
-    sasl->halt = false;
 
     transport->sasl = sasl;
   }
@@ -398,9 +397,8 @@ static void pni_sasl_force_anonymous(pn_transport_t *transport)
         pni_process_mechanisms(transport, "ANONYMOUS")) {
       pni_sasl_set_desired_state(transport, SASL_PRETEND_OUTCOME);
     } else {
-      sasl->last_state = SASL_RECVED_OUTCOME;
-      sasl->halt = true;
-      pn_transport_close_tail(transport);
+      sasl->outcome = PN_SASL_PERM;
+      pni_sasl_set_desired_state(transport, SASL_RECVED_OUTCOME);
     }
   }
 }
@@ -512,7 +510,8 @@ ssize_t pn_sasl_input(pn_transport_t *transport, const char *bytes, size_t
avail
   pn_sasl_process(transport);
 
   pni_sasl_t *sasl = transport->sasl;
-  ssize_t n = pn_dispatcher_input(transport, bytes, available, false, &sasl->halt);
+  bool dummy = false;
+  ssize_t n = pn_dispatcher_input(transport, bytes, available, false, &dummy);
 
   if (n==0 && pni_sasl_is_final_input_state(sasl)) {
     return PN_EOS;


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


Mime
View raw message