qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject [24/41] qpid-proton git commit: PROTON-1859: [cpp] auto-accept over-writing user transfer state
Date Wed, 04 Jul 2018 15:57:56 GMT
PROTON-1859: [cpp] auto-accept over-writing user transfer state

messaging_adapter was incorrectly checking settled() to determine if the local
handler had settled a transfer, settled() returns the *remote* state. For a
delivery that was not yet settled remotely, this would over-write the state set
by the user handler.

Check for local_state == 0 instead.


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

Branch: refs/heads/go1
Commit: 5bc84443c4092286e2447a522a08014295d484c8
Parents: c7205a6
Author: Alan Conway <aconway@redhat.com>
Authored: Tue Jun 12 20:34:35 2018 -0400
Committer: Alan Conway <aconway@redhat.com>
Committed: Wed Jun 13 08:51:21 2018 -0400

----------------------------------------------------------------------
 cpp/src/messaging_adapter.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/5bc84443/cpp/src/messaging_adapter.cpp
----------------------------------------------------------------------
diff --git a/cpp/src/messaging_adapter.cpp b/cpp/src/messaging_adapter.cpp
index dad8dd2..7895aa7 100644
--- a/cpp/src/messaging_adapter.cpp
+++ b/cpp/src/messaging_adapter.cpp
@@ -128,7 +128,7 @@ void on_delivery(messaging_handler& handler, pn_event_t* event) {
                     d.release();
             } else {
                 handler.on_message(d, msg);
-                if (lctx.auto_accept && !d.settled())
+                if (lctx.auto_accept && pn_delivery_local_state(dlv) == 0) // Not
set by handler
                     d.accept();
                 if (lctx.draining && !pn_link_credit(lnk)) {
                     lctx.draining = false;


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


Mime
View raw message