a bit of cleanup

svn:r4884
This commit is contained in:
Roger Dingledine 2005-08-30 06:01:13 +00:00
parent 0691c7221e
commit a8c0c51e0b

View File

@ -453,28 +453,6 @@ directory_set_dirty()
runningrouters_is_dirty = now;
}
#if 0
/** Load all descriptors from a directory stored in the string
* <b>dir</b>.
*/
int
dirserv_load_from_directory_string(const char *dir)
{
const char *cp = dir, *m;
while (1) {
cp = strstr(cp, "\nrouter ");
if (!cp) break;
++cp;
if (dirserv_add_descriptor(&cp,&m) < -1) {
/* only fail if parsing failed; keep going if simply rejected */
return -1;
}
--cp; /*Back up to newline.*/
}
return 0;
}
#endif
/**
* Allocate and return a description of the status of the server <b>desc</b>,
* for use in a router-status line. The server is listed
@ -1183,9 +1161,9 @@ generate_v2_networkstatus(void)
}
/** Look for a network status object as specified by <b>key</b>, which should
* be eiher "authority" (to find a network status generated by us), a hex
* be either "authority" (to find a network status generated by us), a hex
* identity digest (to find a network status generated by given directory), or
* "all" (to return all the v2 network status objects we have, concatenated.
* "all" (to return all the v2 network status objects we have, concatenated).
* If <b>compress</b>, find the version compressed with zlib. Return 0 if
* nothing was found; otherwise set *<b>directory</b> to the matching network
* status and return its length.
@ -1215,8 +1193,7 @@ dirserv_get_networkstatus_v2(const char **directory, const char *key,
return 0;
}
/**
* Add a routerinfo_t to <b>descs_out</b> for each routers matching
/** Add a routerinfo_t to <b>descs_out</b> for each routers matching
* <b>key</b>. The key should be either "/tor/server/authority" for our own
* routerinfo; "/tor/server/all" for all the routerinfos we have,
* concatenated; or "/tor/server/FP" where FP is a plus-separated sequence of