[or-cvs] [tor/master 7/7] Make connection direction statistics compile again.

nickm at torproject.org nickm at torproject.org
Fri Dec 3 17:35:14 UTC 2010


Author: Karsten Loesing <karsten.loesing at gmx.net>
Date: Fri, 3 Dec 2010 16:57:08 +0100
Subject: Make connection direction statistics compile again.
Commit: 0bd884cd5b5e22283f7fa02a5ff4ef86ebd32095

---
 src/or/router.c |   10 +---------
 1 files changed, 1 insertions(+), 9 deletions(-)

diff --git a/src/or/router.c b/src/or/router.c
index 686151a..f630d25 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -2054,15 +2054,7 @@ extrainfo_dump_to_string(char **s_out, extrainfo_t *extrainfo,
     if (options->ConnDirectionStatistics &&
         load_stats_file("stats"PATH_SEPARATOR"conn-stats",
                         "conn-bi-direct", now, &contents) > 0) {
-      size_t pos = strlen(s);
-      if (strlcpy(s + pos, contents, maxlen - strlen(s)) !=
-          strlen(contents)) {
-        log_warn(LD_DIR, "Could not write conn-stats to extra-info "
-                 "descriptor.");
-        s[pos] = '\0';
-        write_stats_to_extrainfo = 0;
-      }
-      tor_free(contents);
+      smartlist_add(chunks, contents);
     }
   }
 
-- 
1.7.1



More information about the tor-commits mailing list