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

[tor-commits] [onionoo/master] Allow for missing server descriptors.



commit 88a1569398c1b3ae8c101e40ecfcda989b18e02a
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date:   Mon Mar 5 09:43:50 2012 +0100

    Allow for missing server descriptors.
---
 src/org/torproject/onionoo/DetailDataWriter.java |    4 ++-
 web/index.html                                   |   33 ++++++++++++++++------
 2 files changed, 27 insertions(+), 10 deletions(-)

diff --git a/src/org/torproject/onionoo/DetailDataWriter.java b/src/org/torproject/onionoo/DetailDataWriter.java
index fb15841..98f0cb1 100644
--- a/src/org/torproject/onionoo/DetailDataWriter.java
+++ b/src/org/torproject/onionoo/DetailDataWriter.java
@@ -231,7 +231,9 @@ public class DetailDataWriter {
             }
           }
           br.close();
-          descriptorParts = sb.toString();
+          if (sb.length() > 0) {
+            descriptorParts = sb.toString();
+          }
         } catch (IOException e) {
           System.err.println("Could not read '"
               + detailsFile.getAbsolutePath() + "'.  Skipping");
diff --git a/web/index.html b/web/index.html
index 20bc02e..27bb094 100755
--- a/web/index.html
+++ b/web/index.html
@@ -215,22 +215,31 @@ Omitted if the relay IP address could not be found in the AS database.
 Added on February 28, 2012.</li>
 <li><b>"last_restarted":</b> UTC timestamp (YYYY-MM-DD hh:mm:ss) when the
 relay was last (re-)started.
-Required field.</li>
+<font color="red">Optional field.</font>
+Missing if router descriptor containing this information cannot be found.
+Made field optional on March 5, 2012.</li>
 <li><b>"advertised_bandwidth":</b> Bandwidth in bytes per second that this
 relay is willing and capable to provide.
-Required field.</li>
+<font color="red">Optional field.</font>
+Missing if router descriptor containing this information cannot be found.
+Made field optional on March 5, 2012.</li>
 <li><b>"exit_policy":</b> Array of exit-policy lines.
-Required field.</li>
+<font color="red">Optional field.</font>
+Missing if router descriptor containing this information cannot be found.
+Made field optional on March 5, 2012.</li>
 <li><b>"contact":</b> Contact address of the relay operator.
-Omitted if empty.</li>
+Omitted if empty or if descriptor containing this information cannot be
+found.</li>
 <li><b>"platform":</b> Platform string containing operating system and Tor
 version details.
 Optional field.
-Omitted if empty.</li>
+Omitted if empty or if descriptor containing this information cannot be
+found.</li>
 <li><b>"family":</b> Array of fingerprints or nicknames of relays in the
 same family as this relay.
 Optional field.
-Omitted if empty.</li>
+Omitted if empty or if descriptor containing this information cannot be
+found.</li>
 </ul>
 </li>
 <li><b>"bridges_published":</b> UTC timestamp (YYYY-MM-DD hh:mm:ss) when
@@ -264,13 +273,19 @@ Optional field.
 Omitted if empty.</li>
 <li><b>"last_restarted":</b> UTC timestamp (YYYY-MM-DD hh:mm:ss) when the
 bridge was last (re-)started.
-Required field.</li>
+<font color="red">Optional field.</font>
+Missing if router descriptor containing this information cannot be found.
+Made field optional on March 5, 2012.</li>
 <li><b>"advertised_bandwidth":</b> Bandwidth in bytes per second that this
 bridge is willing and capable to provide.
-Required field.</li>
+<font color="red">Optional field.</font>
+Missing if router descriptor containing this information cannot be found.
+Made field optional on March 5, 2012.</li>
 <li><b>"platform":</b> Platform string containing operating system and Tor
 version details.
-Omitted if not provided by the bridge.</li>
+Optional field.
+Omitted if not provided by the bridge or if descriptor containing this
+information cannot be found.</li>
 <li><b>"pool_assignment":</b> Information of the pool that BridgeDB
 assigned this bridge to, including further assignment information if
 available.

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