aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection_or.c
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2018-02-14 13:40:42 +0200
committerDavid Goulet <dgoulet@torproject.org>2018-03-27 12:43:39 -0400
commitab16f1e2a10ee1b95118ec266ba454697e9af012 (patch)
tree19d752188e2bd80bc3e55b8fad294d3d891cfc8f /src/or/connection_or.c
parentf29d158330a8c6bcc91b71a888db741766135aaf (diff)
downloadtor-ab16f1e2a10ee1b95118ec266ba454697e9af012.tar.gz
tor-ab16f1e2a10ee1b95118ec266ba454697e9af012.zip
test: Add unittest for the OR connection failure cache
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/connection_or.c')
-rw-r--r--src/or/connection_or.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/or/connection_or.c b/src/or/connection_or.c
index 976889ad0a..267463312c 100644
--- a/src/or/connection_or.c
+++ b/src/or/connection_or.c
@@ -28,6 +28,7 @@
* part of a subclass (channel_tls_t).
*/
#define TOR_CHANNEL_INTERNAL_
+#define CONNECTION_OR_PRIVATE
#include "channel.h"
#include "channeltls.h"
#include "circuitbuild.h"
@@ -1255,7 +1256,7 @@ or_connect_failure_find(const or_connection_t *or_conn)
/* Note down in the connection failure cache that a failure occurred on the
* given or_conn. */
-static void
+STATIC void
note_or_connect_failed(const or_connection_t *or_conn)
{
or_connect_failure_entry_t *ocf = NULL;
@@ -1294,7 +1295,7 @@ or_connect_failure_map_cleanup(time_t cutoff)
*
* The or_conn MUST have gone through connection_or_check_canonicity() so the
* base address is properly set to what we know or doesn't know. */
-static int
+STATIC int
should_connect_to_relay(const or_connection_t *or_conn)
{
time_t now, cutoff;