aboutsummaryrefslogtreecommitdiff
path: root/src/or/router.c
diff options
context:
space:
mode:
authorKarsten Loesing <karsten.loesing@gmx.net>2009-08-19 23:36:27 +0200
committerKarsten Loesing <karsten.loesing@gmx.net>2009-08-19 23:36:27 +0200
commit75c59d1a92e0f4956bd249844c188c432aae1712 (patch)
tree5f95980dbf7d738aa0b31fb9a060773c33ea959c /src/or/router.c
parent93fd0d37559dcd4f75bba158182f486d7323b8ef (diff)
downloadtor-75c59d1a92e0f4956bd249844c188c432aae1712.tar.gz
tor-75c59d1a92e0f4956bd249844c188c432aae1712.zip
Some final (?) cleanups of proposal 166 implementation.
Diffstat (limited to 'src/or/router.c')
-rw-r--r--src/or/router.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/or/router.c b/src/or/router.c
index bb63dc205e..64267f242c 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -1847,18 +1847,18 @@ load_stats_file(const char *filename, const char *end_line, time_t after,
if (start != contents)
start++; /* Avoid infinite loops. */
if (!(start = strstr(start, end_line)))
- goto err;
- if (strlen(start) < strlen(end_line) + sizeof(timestr))
- goto err;
+ goto notfound;
+ if (strlen(start) < strlen(end_line) + 1 + sizeof(timestr))
+ goto notfound;
strlcpy(timestr, start + 1 + strlen(end_line), sizeof(timestr));
if (parse_iso_time(timestr, &written) < 0)
- goto err;
- } while (written < after);
+ goto notfound;
+ } while (written <= after);
*out = tor_malloc(strlen(start));
strlcpy(*out, start, strlen(start));
r = 1;
}
- err:
+ notfound:
tor_free(contents);
break;
case FN_NOENT:
@@ -2011,8 +2011,6 @@ extrainfo_dump_to_string(char *s, size_t maxlen, extrainfo_t *extrainfo,
extrainfo_free(ei_tmp);
}
- log_info(LD_GENERAL, "Done with dumping our extra-info descriptor.");
-
return (int)strlen(s)+1;
}