소스 검색

Fix getinfo_helper_networkstatus to return 0 on question-not-known

It erroneously returned -1 instead, which made it say "Internal error"
rather than "Unrecognized key."
Nick Mathewson 15 년 전
부모
커밋
d461799f0b
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/or/networkstatus.c

+ 1 - 1
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)