qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tr...@apache.org
Subject [36/50] [abbrv] qpid-dispatch git commit: DISPATCH-179 - Added ingress and egress phases for waypoint addresses.
Date Fri, 18 Mar 2016 23:06:54 GMT
DISPATCH-179 - Added ingress and egress phases for waypoint addresses.


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

Branch: refs/heads/master
Commit: 8fb13f56cc54c2a2c430ad9ac4ec5ced56d92965
Parents: de4413f
Author: Ted Ross <tross@redhat.com>
Authored: Wed Mar 16 18:22:23 2016 -0400
Committer: Ted Ross <tross@redhat.com>
Committed: Wed Mar 16 18:22:23 2016 -0400

----------------------------------------------------------------------
 src/router_core/connections.c         | 13 +++++++++++--
 src/router_core/route_control.c       |  2 +-
 src/router_core/router_core_private.h |  2 +-
 3 files changed, 13 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/8fb13f56/src/router_core/connections.c
----------------------------------------------------------------------
diff --git a/src/router_core/connections.c b/src/router_core/connections.c
index a07d11a..4f38dcb 100644
--- a/src/router_core/connections.c
+++ b/src/router_core/connections.c
@@ -530,7 +530,7 @@ static char qdr_prefix_for_dir(qd_direction_t dir)
 }
 
 
-qd_address_treatment_t qdr_treatment_for_address_CT(qdr_core_t *core, qd_field_iterator_t
*iter)
+qd_address_treatment_t qdr_treatment_for_address_CT(qdr_core_t *core, qd_field_iterator_t
*iter, int *in_phase, int *out_phase)
 {
     qdr_address_config_t *addr = 0;
 
@@ -541,6 +541,9 @@ qd_address_treatment_t qdr_treatment_for_address_CT(qdr_core_t *core,
qd_field_i
     qd_address_iterator_override_prefix(iter, 'Z');
     qd_hash_retrieve_prefix(core->addr_hash, iter, (void**) &addr);
     qd_address_iterator_override_prefix(iter, '\0');
+    if (in_phase)  *in_phase  = addr ? addr->in_phase  : 0;
+    if (out_phase) *out_phase = addr ? addr->out_phase : 0;
+
     return addr ? addr->treatment : QD_TREATMENT_ANYCAST_CLOSEST;
 }
 
@@ -680,7 +683,13 @@ static qdr_address_t *qdr_lookup_terminus_address_CT(qdr_core_t     *core,
     qd_address_iterator_override_prefix(iter, '\0'); // Cancel previous override
     qd_hash_retrieve(core->addr_hash, iter, (void**) &addr);
     if (!addr && create_if_not_found) {
-        addr = qdr_address_CT(core, qdr_treatment_for_address_CT(core, iter));
+        int in_phase;
+        int out_phase;
+        int addr_phase;
+
+        addr = qdr_address_CT(core, qdr_treatment_for_address_CT(core, iter, &in_phase,
&out_phase));
+        addr_phase = dir == QD_INCOMING ? in_phase : out_phase;
+        qd_address_iterator_set_phase(iter, addr_phase);
         qd_hash_insert(core->addr_hash, iter, addr, &addr->hash_handle);
         DEQ_INSERT_TAIL(core->addrs, addr);
     }

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/8fb13f56/src/router_core/route_control.c
----------------------------------------------------------------------
diff --git a/src/router_core/route_control.c b/src/router_core/route_control.c
index 54f4573..9ddad29 100644
--- a/src/router_core/route_control.c
+++ b/src/router_core/route_control.c
@@ -234,7 +234,7 @@ qdr_auto_link_t *qdr_route_add_auto_link_CT(qdr_core_t          *core,
 
     qd_hash_retrieve(core->addr_hash, iter, (void*) &al->addr);
     if (!al->addr) {
-        al->addr = qdr_address_CT(core, qdr_treatment_for_address_CT(core, iter));
+        al->addr = qdr_address_CT(core, qdr_treatment_for_address_CT(core, iter, 0, 0));
         DEQ_INSERT_TAIL(core->addrs, al->addr);
         qd_hash_insert(core->addr_hash, iter, al->addr, &al->addr->hash_handle);
     }

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/8fb13f56/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 6956b67..1e5eb44 100644
--- a/src/router_core/router_core_private.h
+++ b/src/router_core/router_core_private.h
@@ -562,7 +562,7 @@ void qdr_check_addr_CT(qdr_core_t *core, qdr_address_t *addr, bool was_local);
 qdr_delivery_t *qdr_forward_new_delivery_CT(qdr_core_t *core, qdr_delivery_t *peer, qdr_link_t
*link, qd_message_t *msg);
 void qdr_forward_deliver_CT(qdr_core_t *core, qdr_link_t *link, qdr_delivery_t *dlv);
 void qdr_connection_activate_CT(qdr_core_t *core, qdr_connection_t *conn);
-qd_address_treatment_t qdr_treatment_for_address_CT(qdr_core_t *core, qd_field_iterator_t
*iter);
+qd_address_treatment_t qdr_treatment_for_address_CT(qdr_core_t *core, qd_field_iterator_t
*iter, int *in_phase, int *out_phase);
 
 void qdr_connection_enqueue_work_CT(qdr_core_t            *core,
                                     qdr_connection_t      *conn,


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


Mime
View raw message