[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/release-0.3.4] Merge branch 'maint-0.3.3' into maint-0.3.4



commit 529faef28eb3e8907cfb814516953d6636f50487
Merge: afee78541 69918629f
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Mon Jul 9 10:15:16 2018 -0400

    Merge branch 'maint-0.3.3' into maint-0.3.4

 changes/bug26269 |  5 +++++
 src/or/router.c  | 17 ++++++++++-------
 2 files changed, 15 insertions(+), 7 deletions(-)

diff --cc src/or/router.c
index 3879863e8,a3d7cd373..5485ec913
--- a/src/or/router.c
+++ b/src/or/router.c
@@@ -2636,12 -2523,11 +2637,14 @@@ check_descriptor_bandwidth_changed(time
  {
    static time_t last_changed = 0;
    uint64_t prev, cur;
-   if (!router_get_my_routerinfo())
+   const routerinfo_t *my_ri = router_get_my_routerinfo();
+   if (!my_ri) /* make sure routerinfo exists */
      return;
  
-   prev = router_get_my_routerinfo()->bandwidthcapacity;
+   prev = my_ri->bandwidthcapacity;
++
 +  /* Consider ourselves to have zero bandwidth if we're hibernating or
 +   * shutting down. */
    cur = we_are_hibernating() ? 0 : rep_hist_bandwidth_assess();
    if ((prev != cur && (!prev || !cur)) ||
        cur > prev*2 ||
@@@ -3813,4 -3733,4 +3817,3 @@@ router_get_all_orports(const routerinfo
    fake_node.ri = (routerinfo_t *)ri;
    return node_get_all_orports(&fake_node);
  }
--



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits