Selaa lähdekoodia

Only warn about version newness once

svn:r2189
Nick Mathewson 20 vuotta sitten
vanhempi
commit
3de630ec67
1 muutettua tiedostoa jossa 6 lisäystä ja 2 poistoa
  1. 6 2
      src/or/routerparse.c

+ 6 - 2
src/or/routerparse.c

@@ -197,6 +197,7 @@ get_recommended_software_from_directory(const char *str)
   char *version, *comma, *cp;
   tor_version_t mine, other;
   int found_newer = 0, r;
+  static int warned_too_new=0;
 
   vl = versionlist;
 
@@ -234,8 +235,11 @@ get_recommended_software_from_directory(const char *str)
       break;
   }
   if (!found_newer) {
-    log_fn(LOG_WARN, "This version of Tor (%s) is newer than any on the recommended list (%s)",
-           myversion, versionlist);
+    if (!warned_too_new) {
+      log_fn(LOG_WARN, "This version of Tor (%s) is newer than any on the recommended list (%s)",
+             myversion, versionlist);
+      warned_too_new=1;
+    }
     return 0;
   } else {
     return 1;