]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
remove experimental 'getinfo unregistered-servers-'
authorRoger Dingledine <arma@torproject.org>
Sat, 11 Jul 2009 20:11:37 +0000 (16:11 -0400)
committerRoger Dingledine <arma@torproject.org>
Mon, 13 Jul 2009 21:34:47 +0000 (17:34 -0400)
it never really worked, and hasn't been used for years.

src/or/control.c
src/or/dirserv.c
src/or/or.h

index 662da98ec101cefee176b8260967e2d9f7893241..068628afd8e4bf3b14989f3375e01956445b11f6 100644 (file)
@@ -1835,7 +1835,6 @@ static const getinfo_item_t getinfo_items[] = {
   PREFIX("ns/purpose/", networkstatus,
          "Brief summary of router status by purpose (v2 directory format)."),
 
-  PREFIX("unregistered-servers-", dirserv_unregistered, NULL),
   ITEM("network-status", dir,
        "Brief summary of router status (v1 directory format)"),
   ITEM("circuit-status", events, "List of current circuits originating here."),
index f355fdf03edb0fb1f1bd6f3d0f673363496583b7..acce309641ff2340c217c23cf769fc9909da4c5f 100644 (file)
@@ -834,46 +834,6 @@ directory_remove_invalid(void)
   routerlist_assert_ok(rl);
 }
 
-/** Write a list of unregistered descriptors into a newly allocated
- * string and return it. Used by dirserv operators to keep track of
- * fast nodes that haven't registered.
- */
-int
-getinfo_helper_dirserv_unregistered(control_connection_t *control_conn,
-                                    const char *question, char **answer_out)
-{
-  smartlist_t *answerlist;
-  char buf[1024];
-  char *answer;
-  int min_bw = atoi(question);
-  routerlist_t *rl = router_get_routerlist();
-
-  (void) control_conn;
-
-  if (strcmpstart(question, "unregistered-servers-"))
-    return 0;
-  question += strlen("unregistered-servers-");
-
-  answerlist = smartlist_create();
-  SMARTLIST_FOREACH(rl->routers, routerinfo_t *, ent, {
-    uint32_t r = dirserv_router_get_status(ent, NULL);
-    if (router_get_advertised_bandwidth(ent) >= (size_t)min_bw &&
-        !(r & FP_NAMED)) {
-      /* then log this one */
-      tor_snprintf(buf, sizeof(buf),
-                   "%s: BW %d on '%s'.",
-                   ent->nickname, router_get_advertised_bandwidth(ent),
-                   ent->platform ? ent->platform : "");
-      smartlist_add(answerlist, tor_strdup(buf));
-    }
-  });
-  answer = smartlist_join_strings(answerlist, "\r\n", 0, NULL);
-  SMARTLIST_FOREACH(answerlist, char *, cp, tor_free(cp));
-  smartlist_free(answerlist);
-  *answer_out = answer;
-  return 0;
-}
-
 /** Mark the directory as <b>dirty</b> -- when we're next asked for a
  * directory, we will rebuild it instead of reusing the most recently
  * generated one.
index f298d53c27342c1efa65fb1318d48e3b2cc09db5..46daa2056a8345726181670a84d25930719135cc 100644 (file)
@@ -3448,8 +3448,6 @@ enum was_router_added_t dirserv_add_multiple_descriptors(
 enum was_router_added_t dirserv_add_descriptor(routerinfo_t *ri,
                                                const char **msg,
                                                const char *source);
-int getinfo_helper_dirserv_unregistered(control_connection_t *conn,
-                                        const char *question, char **answer);
 void dirserv_free_descriptors(void);
 void dirserv_set_router_is_running(routerinfo_t *router, time_t now);
 int list_server_status_v1(smartlist_t *routers, char **router_status_out,