mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Move stub accessor functions a level higher, to consdiffmgr
This commit is contained in:
@@ -1729,3 +1729,54 @@ consdiffmgr_enable_background_compression(void)
|
||||
background_compression = 1;
|
||||
}
|
||||
|
||||
/** Read the lifetime of cached object <b>ent</b> into <b>lifetime</b>. */
|
||||
int
|
||||
consensus_cache_entry_get_lifetime(const consensus_cache_entry_t *ent,
|
||||
long *lifetime)
|
||||
{
|
||||
tor_assert(lifetime);
|
||||
|
||||
// FIXME(ahf): Fill out.
|
||||
*lifetime = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** Return non-zero if the cache object found in <b>ent</b> is
|
||||
* reasonably live, otherwise return 0. Use <b>now</b> to pass the
|
||||
* timestamp used for comparison. */
|
||||
int
|
||||
consensus_cache_entry_is_reasonably_live(const consensus_cache_entry_t *ent,
|
||||
time_t now)
|
||||
{
|
||||
// FIXME(ahf): Fill out.
|
||||
(void)now;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/** Read the set of voters from the cached object <b>ent</b> into <b>out</b>. */
|
||||
int
|
||||
consensus_cache_entry_get_voters(const consensus_cache_entry_t *ent,
|
||||
smartlist_t *out)
|
||||
{
|
||||
// FIXME(ahf): Fill out.
|
||||
(void)out;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** Read the valid until timestamp from the cached object <b>ent</b>
|
||||
* into <b>out</b>. */
|
||||
int
|
||||
consensus_cache_entry_valid_until(const consensus_cache_entry_t *ent,
|
||||
time_t *out)
|
||||
{
|
||||
tor_assert(out);
|
||||
|
||||
// FIXME(ahf): Fill out.
|
||||
*out = time(NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user