]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix getinfo_helper_networkstatus to return 0 on question-not-known
authorNick Mathewson <nickm@torproject.org>
Sun, 18 Jul 2010 15:13:25 +0000 (17:13 +0200)
committerNick Mathewson <nickm@torproject.org>
Sun, 18 Jul 2010 15:13:25 +0000 (17:13 +0200)
It erroneously returned -1 instead, which made it say "Internal error"
rather than "Unrecognized key."

src/or/networkstatus.c

index 4834d13764f5045bcfa451aa8c69ff9d9629cc6e..232e02ae0d982a77dfd3396fc68309849e96e472 100644 (file)
@@ -2160,7 +2160,7 @@ getinfo_helper_networkstatus(control_connection_t *conn,
     *answer = networkstatus_getinfo_by_purpose(question+11, time(NULL));
     return *answer ? 0 : -1;
   } else {
-    return -1;
+    return 0;
   }
 
   if (status)