[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Make directory_request_set_guard_state static.
commit d7fab3603760b40d4db2214b63e958714db5d818
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Fri Apr 21 15:36:08 2017 -0400
Make directory_request_set_guard_state static.
---
src/or/directory.c | 13 ++++++++++---
src/or/directory.h | 2 --
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/src/or/directory.c b/src/or/directory.c
index b504808..4a1b68c 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -120,6 +120,8 @@ static int client_likes_consensus(networkstatus_t *v, const char *want_url);
static void connection_dir_close_consensus_fetches(
dir_connection_t *except_this_one, const char *resource);
+static void directory_request_set_guard_state(directory_request_t *req,
+ struct circuit_guard_state_t *state);
/********* START VARIABLES **********/
@@ -1045,7 +1047,10 @@ struct directory_request_t {
time_t if_modified_since;
/** Hidden-service-specific information */
const rend_data_t *rend_query;
- circuit_guard_state_t *guard_state; // XXXX Does this belong?
+ /** Used internally to directory.c: gets informed when the attempt to
+ * connect to the directory succeeds or fails, if that attempt bears on the
+ * directory's usability as a directory guard. */
+ circuit_guard_state_t *guard_state;
};
/**
@@ -1195,11 +1200,13 @@ directory_request_set_rend_query(directory_request_t *req,
}
req->rend_query = query;
}
-void
+/** Set a static circuit_guard_state_t object to affliate with the request in
+ * <b>req</b>. This object will receive notification when the attempt to
+ * connect to the guard either succeeds or fails. */
+static void
directory_request_set_guard_state(directory_request_t *req,
circuit_guard_state_t *state)
{
- // XXXX make static.
req->guard_state = state;
}
diff --git a/src/or/directory.h b/src/or/directory.h
index 6b2f50b..291ced4 100644
--- a/src/or/directory.h
+++ b/src/or/directory.h
@@ -69,8 +69,6 @@ void directory_request_set_if_modified_since(directory_request_t *req,
time_t if_modified_since);
void directory_request_set_rend_query(directory_request_t *req,
const rend_data_t *query);
-void directory_request_set_guard_state(directory_request_t *req,
- struct circuit_guard_state_t *state);
void directory_request_set_routerstatus(directory_request_t *req,
const routerstatus_t *rs);
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits