qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tr...@apache.org
Subject [17/50] [abbrv] qpid-dispatch git commit: DISPATCH-179 - Handle next-hop for link-routes. Complete backward-compat linkRoutePattern.
Date Fri, 18 Mar 2016 23:06:35 GMT
DISPATCH-179 - Handle next-hop for link-routes.  Complete backward-compat linkRoutePattern.


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

Branch: refs/heads/master
Commit: a12a08523f136b3592252778508c8a6ec2d115a7
Parents: 9d0a8e6
Author: Ted Ross <tross@redhat.com>
Authored: Tue Mar 8 14:22:13 2016 -0500
Committer: Ted Ross <tross@redhat.com>
Committed: Tue Mar 8 14:22:13 2016 -0500

----------------------------------------------------------------------
 src/router_config.c         |  8 ++++++++
 src/router_core/forwarder.c | 19 +++++++++++++++++++
 2 files changed, 27 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/a12a0852/src/router_config.c
----------------------------------------------------------------------
diff --git a/src/router_config.c b/src/router_config.c
index 30ff89b..c08307e 100644
--- a/src/router_config.c
+++ b/src/router_config.c
@@ -152,6 +152,14 @@ qd_error_t qd_router_configure_lrp(qd_router_t *router, qd_entity_t *entity)
 
     qd_compose_insert_string(body, "treatment");
     qd_compose_insert_string(body, "linkBalanced");
+
+    if (connector) {
+        qd_compose_insert_string(body, "connectors");
+        qd_compose_start_list(body);
+        qd_compose_insert_string(body, connector);
+        qd_compose_end_list(body);
+    }
+
     qd_compose_end_map(body);
 
     int              length = 0;

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/a12a0852/src/router_core/forwarder.c
----------------------------------------------------------------------
diff --git a/src/router_core/forwarder.c b/src/router_core/forwarder.c
index 0b4562b..862c498 100644
--- a/src/router_core/forwarder.c
+++ b/src/router_core/forwarder.c
@@ -367,6 +367,25 @@ bool qdr_forward_link_balanced_CT(qdr_core_t     *core,
             DEQ_REMOVE_HEAD(addr->conns);
             DEQ_INSERT_TAIL(addr->conns, conn_ref);
         }
+    } else {
+        //
+        // Look for a next-hop we can use to forward the link-attach.
+        //
+        int         router_bit;
+        qdr_node_t *next_node;
+
+        if (qd_bitmask_first_set(addr->rnodes, &router_bit)) {
+            qdr_node_t *rnode = core->routers_by_mask_bit[router_bit];
+            if (rnode) {
+                if (rnode->next_hop)
+                    next_node = rnode->next_hop;
+                else
+                    next_node = rnode;
+
+                if (next_node && next_node->peer_data_link)
+                    conn = next_node->peer_data_link->conn;
+            }
+        }
     }
 
     //


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


Mime
View raw message