aboutsummaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-04-21 15:36:08 -0400
committerNick Mathewson <nickm@torproject.org>2017-04-21 15:42:09 -0400
commitd7fab3603760b40d4db2214b63e958714db5d818 (patch)
tree8d02fea946912c9ac6fdb741b43c42a68994a698 /src/or
parent81045e19eb49731e26c0bb70cc922de7aca1b1e8 (diff)
downloadtor-d7fab3603760b40d4db2214b63e958714db5d818.tar.gz
tor-d7fab3603760b40d4db2214b63e958714db5d818.zip
Make directory_request_set_guard_state static.
Diffstat (limited to 'src/or')
-rw-r--r--src/or/directory.c13
-rw-r--r--src/or/directory.h2
2 files changed, 10 insertions, 5 deletions
diff --git a/src/or/directory.c b/src/or/directory.c
index b504808b60..4a1b68c497 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 6b2f50b45d..291ced4191 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);