]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Merge branch 'decouple_controller_events_squashed'
authorNick Mathewson <nickm@torproject.org>
Tue, 18 Aug 2015 12:56:31 +0000 (08:56 -0400)
committerNick Mathewson <nickm@torproject.org>
Tue, 18 Aug 2015 12:56:31 +0000 (08:56 -0400)
1  2 
src/common/compat_winthreads.c
src/or/config.c
src/or/control.c
src/or/main.c

Simple merge
diff --cc src/or/config.c
Simple merge
Simple merge
diff --cc src/or/main.c
index 06fc5415676b08e4628cc677b26517a813e7bd25,ee56e100190177125820355d2a7e8ef9b4611019..08fd29427b1bef6a1a47011ac648dba82791ab23
@@@ -1007,34 -1007,9 +1007,34 @@@ directory_all_unreachable_cb(evutil_soc
      connection_mark_unattached_ap(entry_conn,
                                    END_STREAM_REASON_NET_UNREACHABLE);
    }
-   control_event_general_status(LOG_ERR, "DIR_ALL_UNREACHABLE");
+   control_event_general_error("DIR_ALL_UNREACHABLE");
  }
  
 +static struct event *directory_all_unreachable_cb_event = NULL;
 +
 +/** We've just tried every dirserver we know about, and none of
 + * them were reachable. Assume the network is down. Change state
 + * so next time an application connection arrives we'll delay it
 + * and try another directory fetch. Kill off all the circuit_wait
 + * streams that are waiting now, since they will all timeout anyway.
 + */
 +void
 +directory_all_unreachable(time_t now)
 +{
 +  (void)now;
 +
 +  stats_n_seconds_working=0; /* reset it */
 +
 +  if (!directory_all_unreachable_cb_event) {
 +    directory_all_unreachable_cb_event =
 +      tor_event_new(tor_libevent_get_base(),
 +                    -1, EV_READ, directory_all_unreachable_cb, NULL);
 +    tor_assert(directory_all_unreachable_cb_event);
 +  }
 +
 +  event_active(directory_all_unreachable_cb_event, EV_READ, 1);
 +}
 +
  /** This function is called whenever we successfully pull down some new
   * network statuses or server descriptors. */
  void