You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by tr...@apache.org on 2016/09/16 13:20:49 UTC

qpid-dispatch git commit: DISPATCH-505 - Fix handling of credit with unroutable deliveries on anonymous links.

Repository: qpid-dispatch
Updated Branches:
  refs/heads/master 375aec4a5 -> 521e0cafe


DISPATCH-505 - Fix handling of credit with unroutable deliveries on anonymous links.


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

Branch: refs/heads/master
Commit: 521e0cafe9eb59d76819e4aa14cd40fbb596ea0f
Parents: 375aec4
Author: Ted Ross <tr...@redhat.com>
Authored: Tue Sep 13 13:59:42 2016 -0400
Committer: Ted Ross <tr...@redhat.com>
Committed: Fri Sep 16 09:15:22 2016 -0400

----------------------------------------------------------------------
 src/router_core/transfer.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/521e0caf/src/router_core/transfer.c
----------------------------------------------------------------------
diff --git a/src/router_core/transfer.c b/src/router_core/transfer.c
index 5ae61ec..b1348a1 100644
--- a/src/router_core/transfer.c
+++ b/src/router_core/transfer.c
@@ -497,12 +497,14 @@ static int qdr_link_forward_CT(qdr_core_t *core, qdr_link_t *link, qdr_delivery_
             dlv->where = QDR_DELIVERY_IN_UNDELIVERED;
         } else {
             //
-            // Release the delivery
+            // Message was not delivered and the link is anonymous, drop the delivery.
             //
-            qdr_delivery_release_CT(core, dlv);
+            // If the delivery is not settled, release it.
+            //
+            if (!dlv->settled)
+                qdr_delivery_release_CT(core, dlv);
             qdr_delivery_decref(dlv);
-            if (link->link_type == QD_LINK_ROUTER)
-                qdr_link_issue_credit_CT(core, link, 1, false);
+            qdr_link_issue_credit_CT(core, link, 1, false);
         }
     } else if (fanout > 0) {
         if (dlv->settled) {


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