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

[or-cvs] r9141: remove some dead comments, and resolve some XXXs (tor/trunk/src/or)



Author: arma
Date: 2006-12-16 06:34:12 -0500 (Sat, 16 Dec 2006)
New Revision: 9141

Modified:
   tor/trunk/src/or/connection_or.c
   tor/trunk/src/or/hibernate.c
Log:
remove some dead comments, and resolve some XXXs


Modified: tor/trunk/src/or/connection_or.c
===================================================================
--- tor/trunk/src/or/connection_or.c	2006-12-16 07:04:26 UTC (rev 9140)
+++ tor/trunk/src/or/connection_or.c	2006-12-16 11:34:12 UTC (rev 9141)
@@ -543,7 +543,7 @@
  * return -1 if he is lying, broken, or otherwise something is wrong.
  *
  * Make sure he sent a correctly formed certificate. If it has a
- * recognized (approved) nickname, make sure his identity key matches
+ * recognized ("named") nickname, make sure his identity key matches
  * it. If I initiated the connection, make sure it's the right guy.
  *
  * If we return 0, write a hash of the identity key into digest_rcvd,
@@ -666,19 +666,6 @@
   if (!started_here) {
     connection_or_init_conn_from_address(conn,conn->_base.addr,
                                          conn->_base.port, digest_rcvd, 0);
-
-    /* Annotate that we received a TLS connection.
-     * (Todo: only actually consider ourselves reachable if there
-     * exists a testing circuit using conn.)
-     *
-     * We already consider ourselves reachable if we can ever process
-     * a create cell -- see onionskin_answer() in circuitbuild.c.
-     *
-     * The reason this bandaid is here is because there's a bug in
-     * Tor 0.1.1.x where middle hops don't always send their create
-     * cell; so some servers rarely find themselves reachable. */
-//    if (!is_local_IP(conn->_base.addr))
-//      router_orport_found_reachable();
   }
 
   directory_set_dirty();
@@ -734,11 +721,8 @@
                  "Bug: unhandled error on write for OR conn (fd %d); removing",
                  conn->_base.s);
         tor_fragile_assert();
-        // XXX This was supposed to be edge-only!
-        // conn->has_sent_end = 1; /* don't cry wolf about duplicate close */
-
-        /* XXX do we need a close-immediate here, so we don't try to flush? */
-        connection_mark_for_close(TO_CONN(conn));
+        /* do a close-immediate here, so we don't try to flush */
+        connection_close_immediate(TO_CONN(conn));
       }
       return;
     }

Modified: tor/trunk/src/or/hibernate.c
===================================================================
--- tor/trunk/src/or/hibernate.c	2006-12-16 07:04:26 UTC (rev 9140)
+++ tor/trunk/src/or/hibernate.c	2006-12-16 11:34:12 UTC (rev 9141)
@@ -934,7 +934,7 @@
 {
   (void) conn;
   if (!strcmp(question, "accounting/enabled")) {
-    *answer = tor_strdup(get_options()->AccountingMax ? "1" : "0");
+    *answer = tor_strdup(accounting_is_enabled(get_options()) ? "1" : "0");
   } else if (!strcmp(question, "accounting/hibernating")) {
     if (hibernate_state == HIBERNATE_STATE_DORMANT)
       *answer = tor_strdup("hard");