aboutsummaryrefslogtreecommitdiff
path: root/changes/bug27224
AgeCommit message (Collapse)Author
2018-09-13Avoid calling node_get_all_orports() from node_is_a_configured_bridge()rl1987
All node_get_all_orports() does is allocate and return a smartlist with at most two tor_addr_port_t members that match ORPort's of node configuration. This is harmful for memory efficiency, as it allocates the same stuff every time it is called. However, node_is_a_configured_bridge() does not need to call it, as it already has all the information to check if there is configured bridge for a given node. The new code is arranged in a way that hopefully makes each succeeding linear search through bridge_list less likely.