Commit 6d15a735 authored by Nick Mathewson's avatar Nick Mathewson 🤹
Browse files

Resolve/expand some XXXXs and improve a log message or two


svn:r5082
parent cce469c5
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -994,7 +994,6 @@ connection_dir_client_reached_eof(connection_t *conn)
  if (conn->purpose == DIR_PURPOSE_FETCH_SERVERDESC) {
    smartlist_t *which = NULL;
    int n_asked_for = 0;
    /* XXXX NM implement this. */
    log_fn(LOG_INFO,"Received server info (size %d) from server '%s:%d'",
           (int)body_len, conn->address, conn->port);
    if (status_code != 200) {
@@ -1318,7 +1317,8 @@ directory_handle_command_get(connection_t *conn, char *headers,
             *cp++ = '\n';
           });
        *cp = '\0';
        /* XXXX NM This could be way more efficiently handled. */
        /* XXXX This could be way more efficiently handled; let's see if it
         * shows up under oprofile. */
        if (tor_gzip_compress(&compressed, &compressed_len,
                              inp, cp-inp, ZLIB_METHOD)<0) {
          tor_free(inp);
+1 −4
Original line number Diff line number Diff line
@@ -533,12 +533,9 @@ void
directory_info_has_arrived(time_t now, int from_cache)
{
  or_options_t *options = get_options();
  /* XXXX011 NM Update this to reflect new directories.  In particular, we
   * can't start building circuits until we have descriptors and networkstatus
   * docs.*/

  if (!router_have_minimum_dir_info()) {
    log_fn(LOG_NOTICE, "I know too little.");
    log_fn(LOG_NOTICE, "I learned some more directory information, but not enough to build a circuit.");
    return;
  }

+4 −4
Original line number Diff line number Diff line
@@ -856,7 +856,7 @@ router_get_by_nickname(const char *nickname)

  SMARTLIST_FOREACH(routerlist->routers, routerinfo_t *, router,
  {
    /* XXXX001 NM Should this restrict by Named rouers, or warn on
    /* XXXX011 NM Should this restrict by Named rouers, or warn on
     * non-named routers, or something? */
    if (0 == strcasecmp(router->nickname, nickname) ||
        (maybedigest && 0 == memcmp(digest, router->identity_digest,
@@ -1727,7 +1727,7 @@ update_networkstatus_client_downloads(time_t now)
    needed = n_running_dirservers;

  if (needed)
    /* XXXX001 Downgrade to info NM */
    /* XXXX011 Downgrade to info NM */
    log_fn(LOG_NOTICE, "For %d/%d running directory servers, we have %d live"
           " network-status documents. Downloading %d.",
           n_running_dirservers, n_dirservers, n_live, needed);
@@ -2344,7 +2344,7 @@ routers_update_status_from_networkstatus(smartlist_t *routers)
      router->is_running = (n_running > n_recent/2);

      if (router->is_running && ds) {
        /* XXXX001 NM Hm. What about authorities? When do they reset
        /* XXXX011 NM Hm. What about authorities? When do they reset
         * n_networkstatus_failures? */
        ds->n_networkstatus_failures = 0;
      }
@@ -2448,7 +2448,7 @@ update_router_descriptor_downloads(time_t now)
    if (smartlist_len(downloadable)) {
      char *dl = smartlist_join_strings(downloadable,"+",0,NULL);
      size_t r_len = smartlist_len(downloadable)*(HEX_DIGEST_LEN+1)+16;
      /* Damn, that's an ugly way to do this. XXXX011 NM */
      /* XXXX Damn, that's an ugly way to do this. */
      resource = tor_malloc(r_len);
      tor_snprintf(resource, r_len, "fp/%s.z", dl);
      log_fn(LOG_NOTICE, "Launching request for %d routers",
+4 −2
Original line number Diff line number Diff line
@@ -413,7 +413,9 @@ router_parse_directory(const char *str)
  smartlist_t *tokens = NULL;
  crypto_pk_env_t *declared_key = NULL;

  /* XXXX011 This could be simplified a lot! NM */
  /* XXXX This could be simplified a lot, but it will all go away
   * once pre-0.1.1.8 is obsolete, and for now it's better not to
   * tuoch it. */

  if (router_get_dir_hash(str, digest)) {
    log_fn(LOG_WARN, "Unable to compute digest of directory");
@@ -1148,7 +1150,7 @@ networkstatus_parse_from_string(const char *s)
    log_fn(LOG_WARN, "Couldn't find network-status-version keyword");
    goto err;
  }
  /* XXXX do something with the version? NM */
  /* XXXX011 do something with the version! NM */

  if (!(tok = find_first_by_keyword(tokens, K_DIR_SOURCE))) {
    log_fn(LOG_WARN, "Couldn't find dir-source keyword");