/* 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++];
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);
}
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);
}
}
/* 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);