[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] [tor/master 2/2] Fix getinfo_helper_networkstatus to return 0 on question-not-known
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Sun, 18 Jul 2010 17:13:25 +0200
Subject: Fix getinfo_helper_networkstatus to return 0 on question-not-known
Commit: d461799f0b5fe3b5a2c3a74db21d4a89b9b97424
It erroneously returned -1 instead, which made it say "Internal error"
rather than "Unrecognized key."
---
src/or/networkstatus.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c
index 4834d13..232e02a 100644
--- a/src/or/networkstatus.c
+++ b/src/or/networkstatus.c
@@ -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)
--
1.7.1