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

[or-cvs] r17823: {tor} Downgrade some xxx021s, comment more on others, etc (tor/trunk/src/or)



Author: nickm
Date: 2008-12-29 15:17:24 -0500 (Mon, 29 Dec 2008)
New Revision: 17823

Modified:
   tor/trunk/src/or/circuituse.c
   tor/trunk/src/or/config.c
   tor/trunk/src/or/connection.c
   tor/trunk/src/or/or.h
Log:
Downgrade some xxx021s, comment more on others, etc

Modified: tor/trunk/src/or/circuituse.c
===================================================================
--- tor/trunk/src/or/circuituse.c	2008-12-29 20:17:20 UTC (rev 17822)
+++ tor/trunk/src/or/circuituse.c	2008-12-29 20:17:24 UTC (rev 17823)
@@ -812,13 +812,10 @@
     } else if (circ->_base.state == CIRCUIT_STATE_OR_WAIT &&
                circ->_base.n_hop) {
       n_conn_id = circ->_base.n_hop->identity_digest;
-#if 0
-      /* XXXX021 I believe this logic was wrong.  If we're in state_or_wait,
-       * it's wrong to blame a particular connection for our failure to extend
-       * and set its is_bad_for_new_circs field: no connection ever got
-       * a chance to hear our CREATE cell. -NM*/
-      n_conn = connection_or_get_by_identity_digest(n_conn_id);
-#endif
+      /* Do not set n_conn.  If we're in state_or_wait, it's wrong to blame a
+       * particular connection for our failure to extend and set its
+       * is_bad_for_new_circs field, since no connection ever got a chance to
+       * hear our CREATE cell. */
     }
     if (n_conn) {
       log_info(LD_OR,
@@ -1089,7 +1086,7 @@
         return -1;
       }
     } else {
-      /* XXXX021 Duplicates checks in connection_ap_handshake_attach_circuit */
+      /* XXXX022 Duplicates checks in connection_ap_handshake_attach_circuit */
       routerinfo_t *router = router_get_by_nickname(conn->chosen_exit_name, 1);
       int opt = conn->chosen_exit_optional;
       if (router && !connection_ap_can_use_exit(conn, router)) {

Modified: tor/trunk/src/or/config.c
===================================================================
--- tor/trunk/src/or/config.c	2008-12-29 20:17:20 UTC (rev 17822)
+++ tor/trunk/src/or/config.c	2008-12-29 20:17:24 UTC (rev 17823)
@@ -688,8 +688,8 @@
 static int validate_data_directory(or_options_t *options);
 static int write_configuration_file(const char *fname, or_options_t *options);
 static config_line_t *get_assigned_option(config_format_t *fmt,
-                                      or_options_t *options, const char *key,
-                                      int escape_val);
+                                          void *options, const char *key,
+                                          int escape_val);
 static void config_init(config_format_t *fmt, void *options);
 static int or_state_validate(or_state_t *old_options, or_state_t *options,
                              int from_setconf, char **msg);
@@ -1929,9 +1929,8 @@
  * value needs to be quoted before it's put in a config file, quote and
  * escape that value. Return NULL if no such key exists. */
 static config_line_t *
-get_assigned_option(config_format_t *fmt, or_options_t *options,
+get_assigned_option(config_format_t *fmt, void *options,
                     const char *key, int escape_val)
-/* XXXX argument is options, but fmt is provided. Inconsistent. */
 {
   config_var_t *var;
   const void *value;
@@ -2464,7 +2463,7 @@
   if (get_options()->EnforceDistinctSubnets == 0)
     return 0;
   if (tor_addr_family(addr) == AF_INET) {
-    /*XXXX021 IP6 what corresponds to an /24? */
+    /*XXXX022 IP6 what corresponds to an /24? */
     uint32_t ip = tor_addr_to_ipv4h(addr);
 
     /* It's possible that this next check will hit before the first time

Modified: tor/trunk/src/or/connection.c
===================================================================
--- tor/trunk/src/or/connection.c	2008-12-29 20:17:20 UTC (rev 17822)
+++ tor/trunk/src/or/connection.c	2008-12-29 20:17:24 UTC (rev 17823)
@@ -582,8 +582,6 @@
             int reason = tls_error_to_orconn_end_reason(or_conn->tls_error);
             control_event_or_conn_status(or_conn, OR_CONN_EVENT_FAILED,
                                          reason);
-            /* XXX021 come up with a better string for the first arg -RD */
-            /* What did you have in mind? -NM */
             if (!authdir_mode_tests_reachability(options))
               control_event_bootstrap_problem(
                 orconn_end_reason_to_control_string(reason), reason);

Modified: tor/trunk/src/or/or.h
===================================================================
--- tor/trunk/src/or/or.h	2008-12-29 20:17:20 UTC (rev 17822)
+++ tor/trunk/src/or/or.h	2008-12-29 20:17:24 UTC (rev 17823)
@@ -967,8 +967,8 @@
   /** Unique identifier for this connection on this Tor instance. */
   uint64_t global_identifier;
 
-  /* XXXX021 move this field into a subtype, or (hack, spit) make it a union
-   * with some other fields. */
+  /* XXXX022 move this field, and all the listener-only fields (just
+     socket_family, I think), into a new listener_connection_t subtype. */
   /** If the connection is a CONN_TYPE_AP_DNS_LISTENER, this field points
    * to the evdns_server_port is uses to listen to and answer connections. */
   struct evdns_server_port *dns_server_port;