Github user ted-ross commented on a diff in the pull request:
https://github.com/apache/qpid-dispatch/pull/74#discussion_r63245326
--- Diff: src/router_core/forwarder.c ---
@@ -559,20 +559,34 @@ bool qdr_forward_link_balanced_CT(qdr_core_t
*core,
//
// 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 (addr->cost_epoch != core->cost_epoch) {
+ addr->next_remote = -1;
+ addr->cost_epoch = core->cost_epoch;
+ }
- if (next_node && next_node->peer_data_link)
- conn = next_node->peer_data_link->conn;
- }
+ if (addr->next_remote < 0) {
+ qd_bitmask_first_set(addr->rnodes, &addr->next_remote);
--- End diff --
You removed the check of the return value of qd_bitmask_first_set. If
there is no bit set in the mask, bad things will happen.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]