diff options
author | Roger Dingledine <arma@torproject.org> | 2007-01-10 23:48:24 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2007-01-10 23:48:24 +0000 |
commit | 35bd6caa1a1a97236ee94e9652d55dd991db0351 (patch) | |
tree | 19f47225bbb3ed8f037a477824e4385a93711ca2 /src | |
parent | 8835bb844ef30dcd30eba5410340f21bec7057a7 (diff) | |
download | tor-35bd6caa1a1a97236ee94e9652d55dd991db0351.tar.gz tor-35bd6caa1a1a97236ee94e9652d55dd991db0351.zip |
Fix crash with "tor --list-fingerprint" (reported by seeess).
svn:r9328
Diffstat (limited to 'src')
-rw-r--r-- | src/or/circuitlist.c | 2 | ||||
-rw-r--r-- | src/or/config.c | 11 |
2 files changed, 7 insertions, 6 deletions
diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c index 76c3ce8f3a..32125402d1 100644 --- a/src/or/circuitlist.c +++ b/src/or/circuitlist.c @@ -585,7 +585,7 @@ circuit_get_by_edge_conn(edge_connection_t *conn) return circ; } -/** For each circuits that have <b>conn</b> as n_conn or p_conn, unlink the +/** For each circuit that has <b>conn</b> as n_conn or p_conn, unlink the * circuit from the orconn,circid map, and mark it for close if it hasn't * been marked already. */ diff --git a/src/or/config.c b/src/or/config.c index 0ad8dac899..2378aa2946 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -904,16 +904,16 @@ options_act(or_options_t *old_options) tor_free(fn); } - /* Bail out at this point if we're not going to be a client or server: - * we want to not fork, and to log stuff to stderr. */ - if (options->command != CMD_RUN_TOR) - return 0; - /* Load state */ if (! global_state) if (or_state_load()) return -1; + /* Bail out at this point if we're not going to be a client or server: + * we want to not fork, and to log stuff to stderr. */ + if (options->command != CMD_RUN_TOR) + return 0; + { smartlist_t *sl = smartlist_create(); char *errmsg = NULL; @@ -3881,6 +3881,7 @@ decode_libevent_version(void) or_state_t * get_or_state(void) { + tor_assert(global_state); return global_state; } |