summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-05-18 16:54:04 +0000
committerRoger Dingledine <arma@torproject.org>2004-05-18 16:54:04 +0000
commitd2de7120fa62d3691923de23f45a1758a0956eb3 (patch)
treef7705022e6e859c726b4155f396c89ba9025070a
parentffbbf76f9b8d4efa12da7d7c01f202a3d98edee1 (diff)
downloadtor-d2de7120fa62d3691923de23f45a1758a0956eb3.tar.gz
tor-d2de7120fa62d3691923de23f45a1758a0956eb3.zip
fix a seg fault, add another XXX for nick ;)
svn:r1892
-rw-r--r--src/or/dirserv.c1
-rw-r--r--src/or/main.c3
-rw-r--r--src/or/routerlist.c2
3 files changed, 4 insertions, 2 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index fc21a3ebf7..c7a91bd2d4 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -333,6 +333,7 @@ dirserv_add_descriptor(const char **desc)
/* Add this at the end. */
if (n_descriptors >= MAX_ROUTERS_IN_DIR) {
log_fn(LOG_WARN,"Too many descriptors in directory; can't add another.");
+ return -1;
} else {
log_fn(LOG_INFO,"Dirserv adding desc for nickname %s",ri->nickname);
desc_ent_ptr = &descriptor_list[n_descriptors++];
diff --git a/src/or/main.c b/src/or/main.c
index c494908aa8..b5631eb753 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -215,7 +215,7 @@ static void conn_read(int i) {
connection_handle_read(conn) < 0) {
if (!conn->marked_for_close) {
/* this connection is broken. remove it */
- log_fn(LOG_ERR,"Unhandled error on read for %s connection (fd %d); removing",
+ log_fn(LOG_WARN,"Unhandled error on read for %s connection (fd %d); removing",
CONN_TYPE_TO_STRING(conn->type), conn->s);
connection_mark_for_close(conn);
}
@@ -248,6 +248,7 @@ static void conn_write(int i) {
log_fn(LOG_WARN,"Unhandled error on read for %s connection (fd %d); removing",
CONN_TYPE_TO_STRING(conn->type), conn->s);
conn->has_sent_end = 1; /* otherwise we cry wolf about duplicate close */
+ /* XXX do we need a close-immediate here, so we don't try to flush? */
connection_mark_for_close(conn);
}
}
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index b141d910a0..7c0fbaf337 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -323,7 +323,7 @@ int router_add_to_routerlist(routerinfo_t *router) {
/* Remember whether we trust this router as a dirserver. */
if (r->is_trusted_dir)
router->is_trusted_dir = 1;
- /* If the adress hasn't changed; no need to re-resolve. */
+ /* If the address hasn't changed; no need to re-resolve. */
if (!strcasecmp(r->address, router->address))
router->addr = r->addr;
routerinfo_free(r);