summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2007-04-25 06:05:46 +0000
committerRoger Dingledine <arma@torproject.org>2007-04-25 06:05:46 +0000
commit5bdb138d11158c526faa10c2e9647f3b8c304083 (patch)
treec15144dec03c8fb9a51358ef631e3b57f277d5e8
parent8f2883e96bd428b19fe9f0cec29f0215a4290c1a (diff)
downloadtor-5bdb138d11158c526faa10c2e9647f3b8c304083.tar.gz
tor-5bdb138d11158c526faa10c2e9647f3b8c304083.zip
cleanups, and note a bug
svn:r10022
-rw-r--r--doc/spec/proposals/107-uptime-sanity-checking.txt2
-rw-r--r--src/or/control.c4
-rw-r--r--src/or/directory.c3
-rw-r--r--src/or/or.h8
-rw-r--r--src/or/rendcommon.c2
5 files changed, 11 insertions, 8 deletions
diff --git a/doc/spec/proposals/107-uptime-sanity-checking.txt b/doc/spec/proposals/107-uptime-sanity-checking.txt
index d71a70c1ca..a94c3a7342 100644
--- a/doc/spec/proposals/107-uptime-sanity-checking.txt
+++ b/doc/spec/proposals/107-uptime-sanity-checking.txt
@@ -39,7 +39,7 @@ Specification:
Compatibility:
- There should be no compatiblity issues due to uptime capping.
+ There should be no compatibility issues due to uptime capping.
Implementation:
diff --git a/src/or/control.c b/src/or/control.c
index 17744939fb..beeb1727fb 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -3016,6 +3016,10 @@ control_event_networkstatus_changed(smartlist_t *statuses)
smartlist_add(strs, s);
});
smartlist_add(strs, tor_strdup("\r\n.\r\n"));
+ /* XXX the above strdup has an extra \r\n in it, resulting in
+ * a blank line in the NS output. Can we remove it, or is that
+ * bad since the output of networkstatus_getinfo_helper_single()
+ * only adds \n, not \r\n? */
s = smartlist_join_strings(strs, "", 0, NULL);
SMARTLIST_FOREACH(strs, char *, cp, tor_free(cp));
diff --git a/src/or/directory.c b/src/or/directory.c
index 67bfcf8e95..f2b67d6e86 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -1105,8 +1105,7 @@ connection_dir_client_reached_eof(dir_connection_t *conn)
if (next) {
next[1] = 'n';
cp = next+1;
- }
- else
+ } else
break;
}
routers_update_all_from_networkstatus(); /*launches router downloads*/
diff --git a/src/or/or.h b/src/or/or.h
index a5747ed91e..a61f33a34d 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -687,16 +687,16 @@ struct cell_t {
typedef struct packed_cell_t packed_cell_t;
/** A cell as packed for writing to the network. */
struct packed_cell_t {
- struct packed_cell_t *next; /**< Next cell queued on a this circuit. */
+ struct packed_cell_t *next; /**< Next cell queued on this circuit. */
char body[CELL_NETWORK_SIZE]; /**< Cell as packed for network. */
};
/** A queue of cells on a circuit, waiting to be added to the
* or_connection_t's outbuf. */
typedef struct cell_queue_t {
- packed_cell_t *head; /**< The first cell, or NULL if the queue is empty */
- packed_cell_t *tail; /**< The last cell, or NULL if the queue is empty */
- int n; /**< The number of cells in the queue */
+ packed_cell_t *head; /**< The first cell, or NULL if the queue is empty. */
+ packed_cell_t *tail; /**< The last cell, or NULL if the queue is empty. */
+ int n; /**< The number of cells in the queue. */
} cell_queue_t;
/** Beginning of a RELAY cell payload. */
diff --git a/src/or/rendcommon.c b/src/or/rendcommon.c
index ac070919fc..69f614e5cc 100644
--- a/src/or/rendcommon.c
+++ b/src/or/rendcommon.c
@@ -368,7 +368,7 @@ rend_cache_store(const char *desc, size_t desc_len)
rend_cache_entry_t *e;
rend_service_descriptor_t *parsed;
char query[REND_SERVICE_ID_LEN+1];
- char key[REND_SERVICE_ID_LEN+2]; /* 1<query>\0 or 0<query>\0 */
+ char key[REND_SERVICE_ID_LEN+2]; /* 1<query>\0 or 0<query>\0 */
time_t now;
tor_assert(rend_cache);