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/30 12:23:44 UTC

[2/4] qpid-dispatch git commit: DISPATCH-505 - Fix handling of credit with unroutable deliveries on anonymous links.

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/0ec6ede0
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/0ec6ede0
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/0ec6ede0

Branch: refs/heads/0.6.x
Commit: 0ec6ede05f0b780fd94596e37019acd238dec73f
Parents: b18aa3a
Author: Ted Ross <tr...@redhat.com>
Authored: Tue Sep 13 13:59:42 2016 -0400
Committer: Ted Ross <tr...@redhat.com>
Committed: Thu Sep 29 09:01:36 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/0ec6ede0/src/router_core/transfer.c
----------------------------------------------------------------------
diff --git a/src/router_core/transfer.c b/src/router_core/transfer.c
index 40ba82e..40ee1ec 100644
--- a/src/router_core/transfer.c
+++ b/src/router_core/transfer.c
@@ -455,12 +455,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