diff options
author | George Kadianakis <desnacked@riseup.net> | 2017-09-08 19:06:20 +0300 |
---|---|---|
committer | George Kadianakis <desnacked@riseup.net> | 2017-09-08 19:07:00 +0300 |
commit | e7bdb9eedce5edd014090883c222eb474648a87b (patch) | |
tree | 0e79177d9cc25296ef1c6483096f6338528389c6 /src/or/nodelist.c | |
parent | eb81a8e69c654abc0830ce76899945235cf09d7d (diff) | |
download | tor-e7bdb9eedce5edd014090883c222eb474648a87b.tar.gz tor-e7bdb9eedce5edd014090883c222eb474648a87b.zip |
prop224: hs_time_between_tp_and_srv() -> hs_in_period_between_tp_and_srv()
Conflicts:
src/or/nodelist.c
Diffstat (limited to 'src/or/nodelist.c')
-rw-r--r-- | src/or/nodelist.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/or/nodelist.c b/src/or/nodelist.c index 674533b222..29ef835fba 100644 --- a/src/or/nodelist.c +++ b/src/or/nodelist.c @@ -210,7 +210,8 @@ node_set_hsdir_index(node_t *node, const networkstatus_t *ns) /* We always use the current time period for fetching descs */ fetch_tp = current_time_period_num; - if (hs_time_between_tp_and_srv(ns, now)) { + /* Now extract the needed SRVs and time periods for building hsdir indices */ + if (hs_in_period_between_tp_and_srv(ns, now)) { fetch_srv = hs_get_current_srv(fetch_tp, ns); store_first_tp = hs_get_previous_time_period_num(0); @@ -233,7 +234,7 @@ node_set_hsdir_index(node_t *node, const networkstatus_t *ns) /* If we are in the time segment between SRV#N and TP#N, the fetch index is the same as the first store index */ - if (!hs_time_between_tp_and_srv(ns, now)) { + if (!hs_in_period_between_tp_and_srv(ns, now)) { memcpy(node->hsdir_index->store_first, node->hsdir_index->fetch, sizeof(node->hsdir_index->store_first)); } else { @@ -243,7 +244,7 @@ node_set_hsdir_index(node_t *node, const networkstatus_t *ns) /* If we are in the time segment between TP#N and SRV#N+1, the fetch index is the same as the second store index */ - if (hs_time_between_tp_and_srv(ns, now)) { + if (hs_in_period_between_tp_and_srv(ns, now)) { memcpy(node->hsdir_index->store_second, node->hsdir_index->fetch, sizeof(node->hsdir_index->store_second)); } else { |