[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-dev] 2 Re: [PATCH] entrynodes.c: Improve readability (issue 9971)



Am 2014-06-28 23:57, schrieb Martin Kepplinger:
> Maybe we can do away with issue 9971 and improve readability:
> https://trac.torproject.org/projects/tor/ticket/9971
> 


From ec585a3b10f039589ad2b3a4f42f6a4fdae97415 Mon Sep 17 00:00:00 2001
From: Martin Kepplinger <martink@xxxxxxxxx>
Date: Sat, 28 Jun 2014 22:38:44 +0200
Subject: [PATCH] rename for_discovery argument of add_an_entry_guard() to
 forced_probationary

rename the int argument for_discovery of add_an_entry_guard() to
forced_probationary. It resembles a, in some sense, not optimal (forced)
situation regarding a desired 'grade of anonymity'.

That should more clearly tell its purpose and,
in part, address issue 9971.
---
 src/or/entrynodes.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/or/entrynodes.c b/src/or/entrynodes.c
index 957217a..e8b63d7 100644
--- a/src/or/entrynodes.c
+++ b/src/or/entrynodes.c
@@ -352,7 +352,7 @@ control_event_guard_deferred(void)
  * Else, put the one we pick at the end of the list. */
 static const node_t *
 add_an_entry_guard(const node_t *chosen, int reset_status, int prepend,
-                   int for_discovery, int for_directory)
+                   int forced_probationary, int for_directory)
 {
   const node_t *node;
   entry_guard_t *entry;
@@ -413,14 +413,14 @@ add_an_entry_guard(const node_t *chosen, int reset_status, int prepend,
   entry->chosen_by_version = tor_strdup(VERSION);
 
   /* Are we picking this guard because all of our current guards are
-   * down so we need another one (for_discovery is 1), or because we
-   * decided we need more variety in our guard list (for_discovery is 0)?
+   * down so we need another one (forced_probationary is 1), or because we
+   * decided we need more variety in our guard list (forced_probationaryis 0)?
    *
    * Currently we hack this behavior into place by setting "made_contact"
    * for guards of the latter variety, so we'll be willing to use any of
    * them right off the bat.
    */
-  if (!for_discovery)
+  if (!forced_probationary)
     entry->made_contact = 1;
 
   ((node_t*)node)->using_as_guard = 1;
-- 
1.7.10.4

_______________________________________________
tor-dev mailing list
tor-dev@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev