[tor-commits] [vidalia/alpha] Fix when to display the relay offline tip in network map
chiiph at torproject.org
chiiph at torproject.org
Tue Jun 12 13:21:18 UTC 2012
commit 0c5f2db3cba84d7f00ee77b5be3dea320ef8779a
Author: Tomás Touceda <chiiph at torproject.org>
Date: Sat Jun 9 17:12:51 2012 -0300
Fix when to display the relay offline tip in network map
---
changes/fixRouterOfflineNotification | 3 +++
src/vidalia/network/NetViewer.cpp | 13 ++++++++-----
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/changes/fixRouterOfflineNotification b/changes/fixRouterOfflineNotification
new file mode 100644
index 0000000..04c38ba
--- /dev/null
+++ b/changes/fixRouterOfflineNotification
@@ -0,0 +1,3 @@
+ Bugfixes relative to Vidalia 0.3.x:
+ o Show the "Why is my relay offline?" notification only if tor is
+ running one and it's marked as offline.
diff --git a/src/vidalia/network/NetViewer.cpp b/src/vidalia/network/NetViewer.cpp
index eb39ac8..9c2cd3b 100644
--- a/src/vidalia/network/NetViewer.cpp
+++ b/src/vidalia/network/NetViewer.cpp
@@ -396,11 +396,14 @@ NetViewer::preLoadNetworkStatus()
NetworkStatus networkStatus = _torControl->getNetworkStatus();
ServerSettings settings(_torControl);
- if(_torControl->isConnected() and settings.isServerEnabled())
- _routers << *RouterDescriptor::fromTorControl(_torControl);
- else {
- ui.lblConsensus->setVisible(false);
- ui.lblOffline->setVisible(true);
+ if (settings.isServerEnabled()) {
+ RouterDescriptor *rd = RouterDescriptor::fromTorControl(_torControl);
+ if(_torControl->isConnected() and settings.isServerEnabled()) {
+ _routers << *rd;
+ } else {
+ ui.lblConsensus->setVisible(false);
+ ui.lblOffline->setVisible(rd->offline());
+ }
}
bool usingMicrodescriptors = _torControl->useMicrodescriptors();
More information about the tor-commits
mailing list