summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2014-07-09 19:20:41 +0300
committerGeorge Kadianakis <desnacked@riseup.net>2014-07-09 19:20:41 +0300
commitb74442db944be074785ce9590c34358959d7650a (patch)
tree1beb2813202ea69a80a1725d9a75f114c1ac583b /src/test
parenta8fcdbf4a0fcea3c97431f0c2bcc5a7774764ed4 (diff)
downloadtor-b74442db944be074785ce9590c34358959d7650a.tar.gz
tor-b74442db944be074785ce9590c34358959d7650a.zip
Change interface of router_descriptor_is_too_old().
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test_entrynodes.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/test/test_entrynodes.c b/src/test/test_entrynodes.c
index 09a847ffc3..c9b8321c79 100644
--- a/src/test/test_entrynodes.c
+++ b/src/test/test_entrynodes.c
@@ -35,11 +35,13 @@ get_or_state_replacement(void)
return dummy_state;
}
-/* NOP replacement for router_descriptor_is_too_old() */
+/* NOP replacement for router_descriptor_is_older_than() */
static int
-router_descriptor_is_too_old_replacement(const routerinfo_t *router)
+router_descriptor_is_older_than_replacement(const routerinfo_t *router,
+ int seconds)
{
(void) router;
+ (void) seconds;
return 0;
}
@@ -65,8 +67,8 @@ setup_fake_routerlist(const char *fname)
/* We need to mock this function otherwise the descriptors will not
accepted as they are too old. */
- MOCK(router_descriptor_is_too_old,
- router_descriptor_is_too_old_replacement);
+ MOCK(router_descriptor_is_older_than,
+ router_descriptor_is_older_than_replacement);
/* Load all the test descriptors to the routerlist. */
retval = router_load_routers_from_string(contents, NULL, SAVED_IN_JOURNAL,
@@ -89,7 +91,7 @@ setup_fake_routerlist(const char *fname)
} SMARTLIST_FOREACH_END(node);
done:
- UNMOCK(router_descriptor_is_too_old);
+ UNMOCK(router_descriptor_is_older_than);
tor_free(contents);
}