[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [vidalia/alpha] Fix RouterDescriptor values when updated from a RouterStatus
commit da706b72cf029c5022ce823e504c8e6e0fd547b9
Author: Tomás Touceda <chiiph@xxxxxxxxxxxxxx>
Date: Mon Aug 13 18:35:41 2012 -0300
Fix RouterDescriptor values when updated from a RouterStatus
Conflicts:
src/vidalia/network/RouterDescriptorView.cpp
---
changes/bug6601 | 2 ++
src/torcontrol/RouterDescriptor.cpp | 7 ++++---
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/changes/bug6601 b/changes/bug6601
new file mode 100644
index 0000000..cea8133
--- /dev/null
+++ b/changes/bug6601
@@ -0,0 +1,2 @@
+ o Fix RouterDescriptor's bandwidth and uptime values when defined from the
+ consensus. Fixes bug 6601.
diff --git a/src/torcontrol/RouterDescriptor.cpp b/src/torcontrol/RouterDescriptor.cpp
index 0fead9c..a3ee3eb 100644
--- a/src/torcontrol/RouterDescriptor.cpp
+++ b/src/torcontrol/RouterDescriptor.cpp
@@ -107,9 +107,10 @@ 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();
}
RouterDescriptor *
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits