if (chan->state != CHANNEL_STATE_OPEN) { /* If the address matches, don't launch a new connection for this * circuit. */ if (!channel_matches_target_addr_for_extend(chan, target_addr)) ++n_inprogress_goodaddr; continue; }
0.2.3:
if (conn->_base.state != OR_CONN_STATE_OPEN) { /* If the address matches, don't launch a new connection for this * circuit. */ if (!tor_addr_compare(&conn->real_addr, target_addr, CMP_EXACT)) ++n_inprogress_goodaddr; continue; }
My recommendation is that "matches" should return !tor_addr-compare(), that the function documentation should say "Return true iff..." (i.e., describe the return value). The n_noncanonical case should say !matches; the n_inprogress_goodaddr case should say "matches".