Преглед на файлове

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.
Nick Mathewson преди 9 години
родител
ревизия
5be48c5d4c
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      src/or/status.c

+ 1 - 1
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)