diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-11-14 12:57:05 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-11-30 14:42:52 -0500 |
commit | f66f9c82e9b8aaac04dc01ee3bbcf60019864c9b (patch) | |
tree | 9d4f0bfd1135563b7284462c22cde54699c55f9f /src/or/entrynodes.c | |
parent | 62477906e9b5a378bcdd7b4588253ee422ccbb9f (diff) | |
download | tor-f66f9c82e9b8aaac04dc01ee3bbcf60019864c9b.tar.gz tor-f66f9c82e9b8aaac04dc01ee3bbcf60019864c9b.zip |
Make entry_guard_t opaque to circpathbias.c
This was a relatively mechanical change. First, I added an accessor
function for the pathbias-state field of a guard. Then I did a
search-and-replace in circpathbias.c to replace "guard->pb." with
"pb->". Finally, I made sure that "pb" was declared whenever it was
needed.
Diffstat (limited to 'src/or/entrynodes.c')
-rw-r--r-- | src/or/entrynodes.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/or/entrynodes.c b/src/or/entrynodes.c index 1324e31789..90918fa1dc 100644 --- a/src/or/entrynodes.c +++ b/src/or/entrynodes.c @@ -184,6 +184,13 @@ entry_guard_get_rsa_id_digest(const entry_guard_t *guard) return guard->identity; } +/** Return the pathbias state associated with <b>guard</b>. */ +guard_pathbias_t * +entry_guard_get_pathbias_state(entry_guard_t *guard) +{ + return &guard->pb; +} + /** Check whether the entry guard <b>e</b> is usable, given the directory * authorities' opinion about the router (stored in <b>ri</b>) and the user's * configuration (in <b>options</b>). Set <b>e</b>->bad_since |