You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by gm...@apache.org on 2018/06/07 18:28:13 UTC

qpid-dispatch git commit: DISPATCH-1023 - Added a multicast bit on the qdr_delivery_t object to use in places where owning_addr is not available. Also added code to free multi frame non-multicast presettled messages. This closes #318

Repository: qpid-dispatch
Updated Branches:
  refs/heads/master c1e0ceeec -> e96c7ed50


	DISPATCH-1023 - Added a multicast bit on the qdr_delivery_t object to use in places where owning_addr is not available. Also added code to free multi frame non-multicast presettled messages. This closes #318


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

Branch: refs/heads/master
Commit: e96c7ed5083d4563f8b82b8aaaa52d3367d59da9
Parents: c1e0cee
Author: Ganesh Murthy <gm...@redhat.com>
Authored: Mon Jun 4 16:02:10 2018 -0400
Committer: Ganesh Murthy <gm...@redhat.com>
Committed: Thu Jun 7 14:26:59 2018 -0400

----------------------------------------------------------------------
 src/router_core/router_core_private.h | 1 +
 src/router_core/transfer.c            | 8 +++++---
 2 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/e96c7ed5/src/router_core/router_core_private.h
----------------------------------------------------------------------
diff --git a/src/router_core/router_core_private.h b/src/router_core/router_core_private.h
index ae68f18..cd2ffa4 100644
--- a/src/router_core/router_core_private.h
+++ b/src/router_core/router_core_private.h
@@ -353,6 +353,7 @@ struct qdr_delivery_t {
     qdr_link_work_t        *link_work;         ///< Delivery work item for this delivery
     qdr_subscription_list_t subscriptions;
     qdr_delivery_ref_list_t peers;             /// Use this list if there if the delivery has more than one peer.
+    bool                    multicast;         /// True if this delivery is targeted for a multicast address.
 
 };
 

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/e96c7ed5/src/router_core/transfer.c
----------------------------------------------------------------------
diff --git a/src/router_core/transfer.c b/src/router_core/transfer.c
index 609aa10..f3a6f3d 100644
--- a/src/router_core/transfer.c
+++ b/src/router_core/transfer.c
@@ -882,7 +882,8 @@ static void qdr_link_forward_CT(qdr_core_t *core, qdr_link_t *link, qdr_delivery
         qdr_delivery_decref_CT(core, dlv, "qdr_link_forward_CT - removed from action (1)");
         qdr_link_issue_credit_CT(core, link, 1, false);
     } else if (fanout > 0) {
-        if (dlv->settled || qdr_is_addr_treatment_multicast(addr)) {
+        dlv->multicast = qdr_is_addr_treatment_multicast(addr);
+        if (dlv->settled || dlv->multicast) {
             //
             // The delivery is settled.  Keep it off the unsettled list and issue
             // replacement credit for it now.
@@ -913,6 +914,7 @@ static void qdr_link_forward_CT(qdr_core_t *core, qdr_link_t *link, qdr_delivery
             //
             // Again, don't bother decrementing then incrementing the ref_count
             //
+
             DEQ_INSERT_TAIL(link->unsettled, dlv);
             dlv->where = QDR_DELIVERY_IN_UNSETTLED;
             qd_log(core->log, QD_LOG_DEBUG, "Delivery transfer:  dlv:%lx qdr_link_forward_CT: action-list -> unsettled-list", (long) dlv);
@@ -1170,8 +1172,8 @@ static void qdr_deliver_continue_CT(qdr_core_t *core, qdr_action_t *action, bool
             sub = DEQ_HEAD(in_dlv->subscriptions);
         }
 
-        // This is a multicast delivery
-        if (qdr_is_addr_treatment_multicast(in_dlv->link->owning_addr)) {
+        // This is a multicast delivery or if this is a presettled multi-frame unicast delivery.
+        if (in_dlv->multicast || in_dlv->settled) {
             assert(in_dlv->where == QDR_DELIVERY_IN_SETTLED);
             //
             // The router will settle on behalf of the receiver in the case of multicast and send out settled


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