From commits-return-46107-archive-asf-public=cust-asf.ponee.io@qpid.apache.org Wed Jul 4 17:57:41 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id E818518077F for ; Wed, 4 Jul 2018 17:57:40 +0200 (CEST) Received: (qmail 89067 invoked by uid 500); 4 Jul 2018 15:57:34 -0000 Mailing-List: contact commits-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@qpid.apache.org Delivered-To: mailing list commits@qpid.apache.org Received: (qmail 88545 invoked by uid 99); 4 Jul 2018 15:57:34 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Jul 2018 15:57:34 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 8DA0DE11A9; Wed, 4 Jul 2018 15:57:33 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: aconway@apache.org To: commits@qpid.apache.org Date: Wed, 04 Jul 2018 15:57:56 -0000 Message-Id: <32d9e2a864de402ba3a8ba6c8a841795@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [24/41] qpid-proton git commit: PROTON-1859: [cpp] auto-accept over-writing user transfer state 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 Authored: Tue Jun 12 20:34:35 2018 -0400 Committer: Alan Conway 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