[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Work around test_status.c weirdness
commit 5be48c5d4c7339ab69b2becb6176c83d2f637f11
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Tue Feb 3 15:50:31 2015 -0500
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.
---
src/or/status.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/or/status.c b/src/or/status.c
index 98db688..8057abe 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)
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits