diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-09-28 13:29:01 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-09-28 13:40:21 -0400 |
commit | a4b7525c3ce596d4221575806d44652aaa9047a9 (patch) | |
tree | a5d2a00ace1788a3167cd6adc86c94f5ef77930f /src/or/or.h | |
parent | e98c9a1bf6e64a641fd904cbef58b1e46da89e91 (diff) | |
download | tor-a4b7525c3ce596d4221575806d44652aaa9047a9.tar.gz tor-a4b7525c3ce596d4221575806d44652aaa9047a9.zip |
Fix a crash bug in tor_assert(md->held_by_node)
The fix is to turn held_by_node into a reference count.
Fixes bug 4118; bugfix on 0.2.3.1-alpha.
Diffstat (limited to 'src/or/or.h')
-rw-r--r-- | src/or/or.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/or.h b/src/or/or.h index b05c767bfe..a1a0790bc4 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -1830,10 +1830,10 @@ typedef struct microdesc_t { saved_location_t saved_location : 3; /** If true, do not attempt to cache this microdescriptor on disk. */ unsigned int no_save : 1; - /** If true, this microdesc is attached to a node_t. */ - unsigned int held_by_node : 1; /** If true, this microdesc has an entry in the microdesc_map */ unsigned int held_in_map : 1; + /** Reference count: how many node_ts have a reference to this microdesc? */ + unsigned int held_by_nodes; /** If saved_location == SAVED_IN_CACHE, this field holds the offset of the * microdescriptor in the cache. */ |