Repository: qpid-dispatch
Updated Branches:
  refs/heads/master 6203bb927 -> c80efc25d


DISPATCH-1152 - Wired in the on_update callback for the core_endpoint API.


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

Branch: refs/heads/master
Commit: c80efc25dcb67ffdfcf53d3048062091065d358e
Parents: 6203bb9
Author: Ted Ross <tr...@redhat.com>
Authored: Wed Oct 24 16:04:32 2018 -0400
Committer: Ted Ross <tr...@redhat.com>
Committed: Wed Oct 24 16:04:32 2018 -0400

----------------------------------------------------------------------
 src/router_core/core_link_endpoint.c | 7 +++++++
 src/router_core/core_link_endpoint.h | 1 +
 src/router_core/transfer.c           | 6 ++++++
 3 files changed, 14 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/c80efc25/src/router_core/core_link_endpoint.c
----------------------------------------------------------------------
diff --git a/src/router_core/core_link_endpoint.c 
b/src/router_core/core_link_endpoint.c
index fad5c1b..66763c9 100644
--- a/src/router_core/core_link_endpoint.c
+++ b/src/router_core/core_link_endpoint.c
@@ -190,6 +190,13 @@ void qdrc_endpoint_do_deliver_CT(qdr_core_t *core, 
qdrc_endpoint_t *ep, qdr_deli
 }
 
 
+void qdrc_endpoint_do_update_CT(qdr_core_t *core, qdrc_endpoint_t *ep, 
qdr_delivery_t *dlv, bool settled)
+{
+    if (!!ep->desc->on_update)
+        ep->desc->on_update(ep->link_context, dlv, settled, dlv->disposition);
+}
+
+
 void qdrc_endpoint_do_flow_CT(qdr_core_t *core, qdrc_endpoint_t *ep, int 
credit, bool drain)
 {
     if (!!ep->desc->on_flow)

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/c80efc25/src/router_core/core_link_endpoint.h
----------------------------------------------------------------------
diff --git a/src/router_core/core_link_endpoint.h 
b/src/router_core/core_link_endpoint.h
index 34d3d46..c54ee35 100644
--- a/src/router_core/core_link_endpoint.h
+++ b/src/router_core/core_link_endpoint.h
@@ -261,6 +261,7 @@ void qdrc_endpoint_settle_CT(qdr_core_t *core, 
qdr_delivery_t *delivery, uint64_
 void qdrc_endpoint_do_bound_attach_CT(qdr_core_t *core, qdr_address_t *addr, 
qdr_link_t *link, qdr_terminus_t *source, qdr_terminus_t *target);
 void qdrc_endpoint_do_second_attach_CT(qdr_core_t *core, qdrc_endpoint_t 
*endpoint, qdr_terminus_t *source, qdr_terminus_t *target);
 void qdrc_endpoint_do_deliver_CT(qdr_core_t *core, qdrc_endpoint_t *endpoint, 
qdr_delivery_t *delivery);
+void qdrc_endpoint_do_update_CT(qdr_core_t *core, qdrc_endpoint_t *endpoint, 
qdr_delivery_t *delivery, bool settled);
 void qdrc_endpoint_do_flow_CT(qdr_core_t *core, qdrc_endpoint_t *endpoint, int 
credit, bool drain);
 void qdrc_endpoint_do_detach_CT(qdr_core_t *core, qdrc_endpoint_t *endpoint, 
qdr_error_t *error);
 void qdrc_endpoint_do_cleanup_CT(qdr_core_t *core, qdrc_endpoint_t *endpoint);

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/c80efc25/src/router_core/transfer.c
----------------------------------------------------------------------
diff --git a/src/router_core/transfer.c b/src/router_core/transfer.c
index f3457fc..7b7d950 100644
--- a/src/router_core/transfer.c
+++ b/src/router_core/transfer.c
@@ -1147,6 +1147,12 @@ static void qdr_update_delivery_CT(qdr_core_t *core, 
qdr_action_t *action, bool
             dlv_moved = qdr_delivery_settled_CT(core, dlv);
     }
 
+    //
+    // If the delivery's link has a core endpoint, notify the endpoint of the 
update
+    //
+    if (dlv->link && dlv->link->core_endpoint)
+        qdrc_endpoint_do_update_CT(core, dlv->link->core_endpoint, dlv, 
settled);
+
     if (push)
         qdr_delivery_push_CT(core, peer);
 


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

Reply via email to