Browse Source

stop logging at -l notice every single time a create cell successfully
gets processed


svn:r3791

Roger Dingledine 20 years ago
parent
commit
856ab90ca8
3 changed files with 9 additions and 5 deletions
  1. 0 1
      src/or/circuitbuild.c
  2. 1 2
      src/or/main.c
  3. 8 2
      src/or/router.c

+ 0 - 1
src/or/circuitbuild.c

@@ -734,7 +734,6 @@ int onionskin_answer(circuit_t *circ, unsigned char *payload, unsigned char *key
   if (!is_local_IP(circ->p_conn->addr)) {
     /* record that we could process create cells; presumably this means
        that create cells can reach us too. */
-    log_fn(LOG_NOTICE,"Your ORPort is reachable from the outside. Excellent.");
     router_orport_found_reachable();
   }
 

+ 1 - 2
src/or/main.c

@@ -638,9 +638,8 @@ void directory_has_arrived(time_t now, char *identity_digest) {
   if (identity_digest) { /* if this is us, then our dirport is reachable */
     routerinfo_t *router = router_get_by_digest(identity_digest);
     if (!router) // XXX
-      log_fn(LOG_WARN,"Roger, router_get_by_digest doesn't find me.");
+      log_fn(LOG_WARN,"Bug: router_get_by_digest doesn't find me.");
     if (router && router_is_me(router)) {
-      log_fn(LOG_NOTICE,"Your DirPort is reachable from the outside. Excellent.");
       router_dirport_found_reachable();
     }
   }

+ 8 - 2
src/or/router.c

@@ -399,12 +399,18 @@ void consider_testing_reachability(void) {
 
 /** Annotate that we found our ORPort reachable. */
 void router_orport_found_reachable(void) {
-  can_reach_or_port = 1;
+  if (!can_reach_or_port) {
+    log_fn(LOG_NOTICE,"Your ORPort is reachable from the outside. Excellent.");
+    can_reach_or_port = 1;
+  }
 }
 
 /** Annotate that we found our DirPort reachable. */
 void router_dirport_found_reachable(void) {
-  can_reach_dir_port = 1;
+  if (!can_reach_dir_port) {
+    log_fn(LOG_NOTICE,"Your DirPort is reachable from the outside. Excellent.");
+    can_reach_dir_port = 1;
+  }
 }
 
 /** Our router has just moved to a new IP. Reset stats. */