From: Nick Mathewson Date: Tue, 3 Feb 2015 20:50:31 +0000 (-0500) Subject: Work around test_status.c weirdness X-Git-Tag: tor-0.2.6.3-alpha~82 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5be48c5d4c7339ab69b2becb6176c83d2f637f11;p=thirdparty%2Ftor.git Work around test_status.c weirdness Ordinarily, get_options() can never return NULL, but with test_status.c mocking, it can. So test for that case. The best fix here would be to pass the options value to a bridge_server_mode() function. --- diff --git a/src/or/status.c b/src/or/status.c index 98db688e5b..8057abef16 100644 --- a/src/or/status.c +++ b/src/or/status.c @@ -132,7 +132,7 @@ log_heartbeat(time_t now) circuit_log_ancient_one_hop_circuits(1800); - if (options->BridgeRelay) { + if (options && options->BridgeRelay) { char *msg = NULL; msg = format_client_stats_heartbeat(now); if (msg)