]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Merge remote-tracking branch 'andrea/ticket19858_v2'
authorNick Mathewson <nickm@torproject.org>
Wed, 19 Oct 2016 21:11:47 +0000 (17:11 -0400)
committerNick Mathewson <nickm@torproject.org>
Wed, 19 Oct 2016 21:11:47 +0000 (17:11 -0400)
Conflict in entrynodes.c: any_bridge_supports_microdescriptors was
removed in master, and modified in 19858_v2

1  2 
src/or/circuitbuild.c
src/or/entrynodes.c
src/or/entrynodes.h
src/or/or.h
src/or/routerlist.c

Simple merge
index ff02fedbd48b0ebffbcc8a35a6159320fc41bf44,5cd2b728242e730fa1618a3bf7899b65897fc729..b3fa31df7bc7e0c565d1f2e9f86fc05720a10c63
@@@ -2521,6 -2777,45 +2777,22 @@@ entries_retry_all(const or_options_t *o
    entries_retry_helper(options, 1);
  }
  
 -/** Return true if at least one of our bridges runs a Tor version that can
 - * provide microdescriptors to us. If not, we'll fall back to asking for
 - * full descriptors. */
 -int
 -any_bridge_supports_microdescriptors(void)
 -{
 -  const node_t *node;
 -  guard_selection_t *gs = get_guard_selection_info();
 -
 -  if (!get_options()->UseBridges || !(gs->chosen_entry_guards))
 -    return 0;
 -  SMARTLIST_FOREACH_BEGIN(gs->chosen_entry_guards, entry_guard_t *, e) {
 -    node = node_get_by_id(e->identity);
 -    if (node && node->is_running &&
 -        node_is_bridge(node) && node_is_a_configured_bridge(node)) {
 -      /* This is one of our current bridges, and we know enough about
 -       * it to know that it will be able to answer our questions. */
 -       return 1;
 -    }
 -  } SMARTLIST_FOREACH_END(e);
 -  return 0;
 -}
 -
+ /** Free one guard selection context */
+ static void
+ guard_selection_free(guard_selection_t *gs)
+ {
+   if (!gs) return;
+   if (gs->chosen_entry_guards) {
+     SMARTLIST_FOREACH(gs->chosen_entry_guards, entry_guard_t *, e,
+                       entry_guard_free(e));
+     smartlist_free(gs->chosen_entry_guards);
+     gs->chosen_entry_guards = NULL;
+   }
+   tor_free(gs);
+ }
  /** Release all storage held by the list of entry guards and related
   * memory structs. */
  void
Simple merge
diff --cc src/or/or.h
Simple merge
Simple merge