Commit b3d4f7f0 authored by Tomas Touceda's avatar Tomas Touceda
Browse files

Fix RouterDescriptor values when updated from a RouterStatus

parent b00f51dc
Loading
Loading
Loading
Loading

changes/bug6601

0 → 100644
+2 −0
Original line number Diff line number Diff line
  o Fix RouterDescriptor's bandwidth and uptime values when defined from the
    consensus. Fixes bug 6601.
+4 −3
Original line number Diff line number Diff line
@@ -106,7 +106,8 @@ RouterDescriptor::appendRouterStatusInfo(const RouterStatus &rs)
  _ip = rs.ipAddress();
  _orPort = rs.orPort();
  _dirPort = rs.dirPort();
  _avgBandwidth = rs.bandwidth();
  _burstBandwidth = rs.bandwidth();
  _observedBandwidth = rs.bandwidth();
  _avgBandwidth = rs.bandwidth() * 1024;
  _burstBandwidth = rs.bandwidth() * 1024;
  _observedBandwidth = rs.bandwidth() * 1024;
  _published = rs.published();
}
+5 −3
Original line number Diff line number Diff line
@@ -106,6 +106,7 @@ RouterDescriptorView::display(QList<RouterDescriptor> rdlist)

    /* Add the IP address and router platform information */
    html.append(trow(tcol(b(tr("IP Address:"))) + tcol(rd.ip().toString())));
    if (!rd.platform().isEmpty())
      html.append(trow(tcol(b(tr("Platform:")))   + tcol(rd.platform())));

    /* If the router is online, then show the uptime and bandwidth stats. */
@@ -121,6 +122,7 @@ RouterDescriptorView::display(QList<RouterDescriptor> rdlist)
    }

    /* Date the router was published */
    if (!rd.published().isNull())
      html.append(trow(tcol(b(tr("Last Updated:")))  +
                       tcol(string_format_datetime(rd.published()) + " GMT")));