summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2006-08-26 04:48:50 +0000
committerRoger Dingledine <arma@torproject.org>2006-08-26 04:48:50 +0000
commit171a00ec50146efc97bdd4910053a728e15f3bf8 (patch)
treeee40ffd5c7b3a7e07c72a2d1d6ffe1b5182310de
parentfd36eb07889403524d3361d15b5d008c22695952 (diff)
downloadtor-171a00ec50146efc97bdd4910053a728e15f3bf8.tar.gz
tor-171a00ec50146efc97bdd4910053a728e15f3bf8.zip
fix a log level -- err is for things that kill tor, warn is for
things that tor can recover from. also, avoid situations where people who don't read their logs accumulate ten thousand useless files in their datadir. svn:r8227
-rw-r--r--src/or/config.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 74b2ca607b..e18d64ad1d 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -3822,21 +3822,21 @@ or_state_load(void)
}
if (badstate && !contents) {
- log_err(LD_BUG, "Uh oh. We couldn't even validate our own default state. "
- "This is a bug in Tor.");
+ log_warn(LD_BUG, "Uh oh. We couldn't even validate our own default state."
+ " This is a bug in Tor.");
goto done;
} else if (badstate && contents) {
int i;
file_status_t status;
size_t len = strlen(fname)+16;
char *fname2 = tor_malloc(len);
- for (i = 0; i < 10000; ++i) {
+ for (i = 0; i < 100; ++i) {
tor_snprintf(fname2, len, "%s.%d", fname, i);
status = file_status(fname2);
if (status == FN_NOENT)
break;
}
- if (i == 10000) {
+ if (i == 100) {
log_warn(LD_BUG, "Unable to parse state in \"%s\"; too many saved bad "
"state files to move aside. Discarding the old state file.",
fname);