fascist_firewall_choose_address_impl(const tor_addr_port_t *a,
                                     const tor_addr_port_t *b,
                                     int want_a,
                                     firewall_connection_t fw_connection,
                                     int pref_only, int pref_ipv6)
{
  const tor_addr_port_t *use_a = NULL;
  const tor_addr_port_t *use_b = NULL;

  if (fascist_firewall_allows_address_ap(a, fw_connection, pref_only,
                                         pref_ipv6)) {
    use_a = a;
  }

  if (fascist_firewall_allows_address_ap(b, fw_connection, pref_only,
                                         pref_ipv6)) {
    use_b = b;
  }

  /* If both are allowed */
  if (use_a && use_b) {
    /* Choose a if we want it */
    return (want_a ? use_a : use_b);
  } else {
    /* Choose a if we have it */
    return (use_a ? use_a : use_b);
  }
}
fascist_firewall_choose_address_impl(const tor_addr_port_t *a,
                                     const tor_addr_port_t *b,
                                     int want_a,
                                     firewall_connection_t fw_connection,
                                     int pref_only, int pref_ipv6)
{
  const tor_addr_port_t *use_a = NULL;
  const tor_addr_port_t *use_b = NULL;

  if (fascist_firewall_allows_address_ap(a, fw_connection, pref_only,
                                         pref_ipv6)) {
    use_a = a;
  }

  if (fascist_firewall_allows_address_ap(b, fw_connection, pref_only,
                                         pref_ipv6)) {
    use_b = b;
  }

   
  if (use_a && use_b) {
     
    return (want_a ? use_a : use_b);
  } else {
     
    return (use_a ? use_a : use_b);
  }
}