[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[vidalia-svn] r2575: If we're running Tor >= 0.2.0.13-alpha, then check the descr (in vidalia: . trunk/src/vidalia/network)
Author: edmanm
Date: 2008-05-12 21:42:52 -0400 (Mon, 12 May 2008)
New Revision: 2575
Modified:
vidalia/
vidalia/trunk/src/vidalia/network/netviewer.cpp
Log:
r305@thebe: edmanm | 2008-05-12 21:43:26 -0400
If we're running Tor >= 0.2.0.13-alpha, then check the descriptor annotations
for each descriptor before deciding to do a geoip lookup on its IP address. If
the annotations indicate it is a special purpose descriptor (e.g., bridges),
then don't do the lookup at all.
Property changes on: vidalia
___________________________________________________________________
svk:merge ticket from /local/vidalia [r305] on 45a62a8a-8088-484c-baad-c7b3e776dd32
Modified: vidalia/trunk/src/vidalia/network/netviewer.cpp
===================================================================
--- vidalia/trunk/src/vidalia/network/netviewer.cpp 2008-05-13 01:42:47 UTC (rev 2574)
+++ vidalia/trunk/src/vidalia/network/netviewer.cpp 2008-05-13 01:42:52 UTC (rev 2575)
@@ -301,8 +301,18 @@
{
/* Add the descriptor to the list of server */
ui.treeRouterList->addRouter(rd);
- /* Add this IP to a list whose geographic location we'd like to find. */
- addToResolveQueue(rd.ip(), rd.id());
+
+ /* Add this IP to a list of addresses whose geographic location we'd like to
+ * find, but not for special purpose descriptors (e.g., bridges). This
+ * check is only valid for Tor >= 0.2.0.13-alpha. */
+ if (_torControl->getTorVersion() >= 0x020013) {
+ DescriptorAnnotations annotations =
+ _torControl->getDescriptorAnnotations(rd.id());
+ if (!annotations.contains("purpose"))
+ addToResolveQueue(rd.ip(), rd.id());
+ } else {
+ addToResolveQueue(rd.ip(), rd.id());
+ }
}
/** Called when a NEWDESC event arrives. Retrieves new router descriptors