aboutsummaryrefslogtreecommitdiff
path: root/src/or/router.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2013-09-18 10:26:32 -0400
committerNick Mathewson <nickm@torproject.org>2013-09-18 10:26:32 -0400
commitdece40fd7729934bc32906e94d3e5e746c01f970 (patch)
treea0d1a7491e59768676b1a9107cb20c50deebe315 /src/or/router.c
parentb46353b7931235da3ecaec0723060501042d6ef4 (diff)
downloadtor-dece40fd7729934bc32906e94d3e5e746c01f970.tar
tor-dece40fd7729934bc32906e94d3e5e746c01f970.tar.gz
Fix an assert when disabling ORPort with accounting disabled.
The problem was that the server_identity_key_is_set() function could return true under conditions where we don't really have an identity key -- specifically, where we used to have one, but we stopped being a server. This is a fix for 6979; bugfix on 0.2.2.18-alpha where we added that assertion to get_server_identity_key().
Diffstat (limited to 'src/or/router.c')
-rw-r--r--src/or/router.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/router.c b/src/or/router.c
index 1ace8e249..a3459aec7 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -177,7 +177,7 @@ get_server_identity_key(void)
int
server_identity_key_is_set(void)
{
- return server_identitykey != NULL;
+ return server_mode(get_options()) && server_identitykey != NULL;
}
/** Set the current client identity key to <b>k</b>.