[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r9627: cosmetic, comment, and todo fixes (in tor/trunk: . contrib doc src/common src/or)
- To: or-cvs@xxxxxxxxxxxxx
- Subject: [or-cvs] r9627: cosmetic, comment, and todo fixes (in tor/trunk: . contrib doc src/common src/or)
- From: arma@xxxxxxxx
- Date: Fri, 23 Feb 2007 20:12:55 -0500 (EST)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Fri, 23 Feb 2007 20:13:06 -0500
- Reply-to: or-talk@xxxxxxxxxxxxx
- Sender: owner-or-cvs@xxxxxxxxxxxxx
Author: arma
Date: 2007-02-23 20:12:53 -0500 (Fri, 23 Feb 2007)
New Revision: 9627
Modified:
tor/trunk/ChangeLog
tor/trunk/contrib/tor-mingw.nsi.in
tor/trunk/contrib/tor.nsi.in
tor/trunk/doc/TODO
tor/trunk/src/common/util.h
tor/trunk/src/or/circuitlist.c
tor/trunk/src/or/connection_or.c
tor/trunk/src/or/dirserv.c
tor/trunk/src/or/main.c
tor/trunk/src/or/or.h
Log:
cosmetic, comment, and todo fixes
Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog 2007-02-23 23:11:08 UTC (rev 9626)
+++ tor/trunk/ChangeLog 2007-02-24 01:12:53 UTC (rev 9627)
@@ -1,22 +1,23 @@
Changes in version 0.1.2.8-alpha - 2007-??-??
+ o Major bugfixes (crashes):
+ - Stop crashing when the controller asks us to resetconf more than
+ one config option at once. (Vidalia 0.0.11 does this.)
+ - Fix a crash that happened on Win98 when we're given command-line
+ arguments: don't try to load NT service functions from advapi32.dll
+ except when we need them. (Bug introduced in 0.1.2.7-alpha;
+ resolves bug 389.)
+
o Major bugfixes (accounting):
- When we start during an accounting interval before it's time to wake
up, remember to wake up at the correct time. (May fix bug 342.)
- Fix a longstanding obscure crash bug that could occur when
- low on DNS resources. (Resolves bug 390.)
+ we run out of DNS worker processes. (Resolves bug 390.)
- o Major bugfixes (crashes):
- - Stop crashing when the controller asks us to resetconf more than
- one config option at once. (Vidalia 0.0.11 does this.)
- - Fix a crash that happened on Win98 when we're given command-line
- arguments: Don't try to load NT service functions from advapi32.dll
- except when we need them. (bug introduced in 0.1.2.7-alpha).
-
o Minor bugfixes (controller):
- Give the controller END_STREAM_REASON_DESTROY events _before_ we
- clear the corresponding on_circuit variable, and remember later that
- we don't need to send a redundant CLOSED event. (Resolves part 3 of
- bug 367.)
+ clear the corresponding on_circuit variable, and remember later
+ that we don't need to send a redundant CLOSED event. (Resolves part
+ 3 of bug 367.)
- Report events where a resolve succeeded or where we got a socks
protocol error correctly, rather than calling both of them
"INTERNAL".
Modified: tor/trunk/contrib/tor-mingw.nsi.in
===================================================================
--- tor/trunk/contrib/tor-mingw.nsi.in 2007-02-23 23:11:08 UTC (rev 9626)
+++ tor/trunk/contrib/tor-mingw.nsi.in 2007-02-24 01:12:53 UTC (rev 9627)
@@ -1,6 +1,6 @@
;tor.nsi - A basic win32 installer for Tor
; Originally written by J Doe.
-; See LICENSE for licencing information
+; See LICENSE for licensing information
;-----------------------------------------
;
!include "MUI.nsh"
Modified: tor/trunk/contrib/tor.nsi.in
===================================================================
--- tor/trunk/contrib/tor.nsi.in 2007-02-23 23:11:08 UTC (rev 9626)
+++ tor/trunk/contrib/tor.nsi.in 2007-02-24 01:12:53 UTC (rev 9627)
@@ -1,6 +1,6 @@
;tor.nsi - A basic win32 installer for Tor
; Originally written by J Doe.
-; See LICENSE for licencing information
+; See LICENSE for licensing information
;-----------------------------------------
; NOTE: This file might be obsolete. Look at tor-mingw.nsi.in instead.
;-----------------------------------------
Modified: tor/trunk/doc/TODO
===================================================================
--- tor/trunk/doc/TODO 2007-02-23 23:11:08 UTC (rev 9626)
+++ tor/trunk/doc/TODO 2007-02-24 01:12:53 UTC (rev 9627)
@@ -24,6 +24,9 @@
connect to guards that we think are unreachable from time to time.
Make sure that we don't freak out when the network is down.
+ - make the nsis mingw packaging scripts fail if it tries to parse
+ a file but the file is missing.
+
o weight dir requests by advertised bandwidth? with maybe a lower cutoff
than for tor traffic. perhaps also weighted by the expected size of
the response.
@@ -31,12 +34,12 @@
. Have (and document) a BEGIN_DIR relay cell that means "Connect to your
directory port."
o Implement
-R - turn the received socks addr:port into a digest for setting .exit
- - be able to connect without having a server descriptor, to bootstrap.
-R - handle connect-dir streams that don't have a chosen_exit_name set.
- o include ORPort in DirServers lines so we can know where to connect.
- list the orport as 0 if it can't handle begin_dir.
- o List orports of actual dirservers..
+ D turn the received socks addr:port into a digest for setting .exit
+R - be able to connect without having a server descriptor, to bootstrap.
+ D handle connect-dir streams that don't have a chosen_exit_name set.
+ o include ORPort in DirServers lines so we can know where to connect.
+ list the orport as 0 if it can't handle begin_dir.
+ o List orports of actual dirservers..
. option to dl directory info via tor:
TunnelDirConns and PreferTunneledDirConns
@@ -423,6 +426,8 @@
of edge_stream_t.
Future version:
+ - Should TrackHostExits expire TrackHostExitsExpire seconds after their
+ *last* use, not their *first* use?
- Configuration format really wants sections.
- Good RBL substitute.
- Authorities should try using exits for http to connect to some URLS
Modified: tor/trunk/src/common/util.h
===================================================================
--- tor/trunk/src/common/util.h 2007-02-23 23:11:08 UTC (rev 9626)
+++ tor/trunk/src/common/util.h 2007-02-24 01:12:53 UTC (rev 9627)
@@ -214,7 +214,7 @@
/** Flag for read_file_to_str: open the file in binary mode. */
#define RFTS_BIN 1
-/** Flag for read_file_to_str: it's okay if the file doesn't exist */
+/** Flag for read_file_to_str: it's okay if the file doesn't exist. */
#define RFTS_IGNORE_MISSING 2
struct stat;
Modified: tor/trunk/src/or/circuitlist.c
===================================================================
--- tor/trunk/src/or/circuitlist.c 2007-02-23 23:11:08 UTC (rev 9626)
+++ tor/trunk/src/or/circuitlist.c 2007-02-24 01:12:53 UTC (rev 9627)
@@ -751,10 +751,7 @@
* if required, and if info is defined, does not already use info
* as any of its hops; or NULL if no circuit fits this description.
*
- * Return need_uptime circuits if that is requested; and if it's not
- * requested, return non-uptime circuits if possible, else either.
- *
- * Only return internal circuits if that is requested.
+ * If ! need_uptime, prefer returning non-uptime circuits.
*/
origin_circuit_t *
circuit_find_to_cannibalize(uint8_t purpose, extend_info_t *info,
Modified: tor/trunk/src/or/connection_or.c
===================================================================
--- tor/trunk/src/or/connection_or.c 2007-02-23 23:11:08 UTC (rev 9626)
+++ tor/trunk/src/or/connection_or.c 2007-02-24 01:12:53 UTC (rev 9627)
@@ -37,8 +37,8 @@
tmp = digestmap_get(orconn_identity_map, conn->identity_digest);
if (!tmp) {
if (!tor_digest_is_zero(conn->identity_digest)) {
- log_warn(LD_BUG, "Didn't found connection on identity map when trying "
- "to remove it.");
+ log_warn(LD_BUG, "Bug: Didn't find connection on identity map when "
+ "trying to remove it.");
}
return;
}
@@ -86,7 +86,7 @@
}
/** Change conn->identity_digest to digest, and add conn into
- * orconn_digest_map. */
+ * orconn_digest_map. */
static void
connection_or_set_identity_digest(or_connection_t *conn, const char *digest)
{
@@ -105,7 +105,7 @@
memcpy(conn->identity_digest, digest, DIGEST_LEN);
- /* If we're setting the ID to zero, don't add a mapping.*/
+ /* If we're setting the ID to zero, don't add a mapping. */
if (tor_digest_is_zero(digest))
return;
@@ -658,7 +658,7 @@
DIGEST_LEN);
log_fn(severity, LD_OR,
"Tried connecting to router at %s:%d, but identity key was not "
- "as expected wanted %s but got %s",
+ "as expected: wanted %s but got %s.",
conn->_base.address, conn->_base.port, expected, seen);
entry_guard_register_connect_status(conn->identity_digest,0,time(NULL));
router_set_status(conn->identity_digest, 0);
Modified: tor/trunk/src/or/dirserv.c
===================================================================
--- tor/trunk/src/or/dirserv.c 2007-02-23 23:11:08 UTC (rev 9626)
+++ tor/trunk/src/or/dirserv.c 2007-02-24 01:12:53 UTC (rev 9627)
@@ -1028,8 +1028,11 @@
cached_dir_decref(d);
}
-/** If we have no cached directory, or it is older than <b>when</b>, then
- * replace it with <b>directory</b>, published at <b>when</b>.
+/** If we have no cached directory, or it is older than <b>published</b>,
+ * then replace it with <b>directory</b>, published at <b>published</b>.
+ *
+ * If <b>is_running_routers</b>, this is really a running_routers document
+ * rather than a v1 directory.
*/
void
dirserv_set_cached_directory(const char *directory, time_t published,
@@ -1140,15 +1143,15 @@
}
}
-/** Remove any networkstatus from the directory cache that was published
- * before <b>cutoff</b>. */
+/** Remove any v1 info from the directory cache that was published
+ * too long ago. */
void
dirserv_clear_old_v1_info(time_t now)
{
#define MAX_V1_DIRECTORY_AGE (30*24*60*60)
#define MAX_V1_RR_AGE (7*24*60*60)
if (cached_directory &&
- cached_directory->published < (now-MAX_V1_DIRECTORY_AGE)) {
+ cached_directory->published < (now - MAX_V1_DIRECTORY_AGE)) {
cached_dir_decref(cached_directory);
}
if (cached_runningrouters.published < (now - MAX_V1_RR_AGE)) {
@@ -1226,7 +1229,7 @@
/** Return the most recently generated encoded signed directory, generating a
* new one as necessary. If not an authoritative directory may return NULL if
- * no directory is yet cached.*/
+ * no directory is yet cached. */
cached_dir_t *
dirserv_get_directory(void)
{
@@ -1267,7 +1270,7 @@
return the_directory;
}
-/** For authoritative directories: the current (v1) network status */
+/** For authoritative directories: the current (v1) network status. */
static cached_dir_t the_runningrouters = { NULL, NULL, 0, 0, 0, -1 };
/** Replace the current running-routers list with a newly generated one. */
@@ -1337,7 +1340,7 @@
"v1 network status list", 1);
}
-/** For authoritative directories: the current (v2) network status */
+/** For authoritative directories: the current (v2) network status. */
static cached_dir_t *the_v2_networkstatus = NULL;
/** Return true iff our opinion of the routers has been stale for long
@@ -1390,8 +1393,8 @@
return 0;
}
-/** Helper: returns a tristate based on comparing **(uint32_t**)a to
-* **(uint32_t**)b. */
+/** Helper: returns a tristate based on comparing **(uint32_t**)<b>a</b>
+ * to **(uint32_t**)<b>b</b>. */
static int
_compare_uint32(const void **a, const void **b)
{
Modified: tor/trunk/src/or/main.c
===================================================================
--- tor/trunk/src/or/main.c 2007-02-23 23:11:08 UTC (rev 9626)
+++ tor/trunk/src/or/main.c 2007-02-24 01:12:53 UTC (rev 9627)
@@ -1807,8 +1807,8 @@
NULL, NULL, NULL, NULL, NULL, NULL,
NULL};
-/** Loads functions used by NT services. Returns 0 on success, exits on
- * error. */
+/** Loads functions used by NT services. Returns on success, or prints a
+ * complaint to stdout and exits on error. */
static void
nt_service_loadlibrary(void)
{
Modified: tor/trunk/src/or/or.h
===================================================================
--- tor/trunk/src/or/or.h 2007-02-23 23:11:08 UTC (rev 9626)
+++ tor/trunk/src/or/or.h 2007-02-24 01:12:53 UTC (rev 9627)
@@ -797,8 +797,8 @@
typedef struct or_connection_t {
connection_t _base;
- /** Hash of the public RSA key for the other side's identity key, or zero if
- * the other side hasn't shown us a valid identity key. */
+ /** Hash of the public RSA key for the other side's identity key, or zeroes
+ * if the other side hasn't shown us a valid identity key. */
char identity_digest[DIGEST_LEN];
char *nickname; /**< Nickname of OR on other side (if any). */