diff options
author | Karsten Loesing <karsten.loesing@gmx.net> | 2010-11-13 22:25:19 +0100 |
---|---|---|
committer | Karsten Loesing <karsten.loesing@gmx.net> | 2010-11-15 12:51:51 +0100 |
commit | cec21652a7c939d1112591347e35c0815de63f93 (patch) | |
tree | 2e751f82e99229b9fb2044e4fc21d7bc9b169952 /src/or/rephist.c | |
parent | dbba84c917279c8c58b1bfdac37fbcdfd84b7bb7 (diff) | |
download | tor-cec21652a7c939d1112591347e35c0815de63f93.tar.gz tor-cec21652a7c939d1112591347e35c0815de63f93.zip |
Try harder not to exceed the 50 KB extra-info descriptor limit.
Our checks that we don't exceed the 50 KB size limit of extra-info
descriptors apparently failed. This patch fixes these checks and reserves
another 250 bytes for appending the signature. Fixes bug 2183.
Diffstat (limited to 'src/or/rephist.c')
-rw-r--r-- | src/or/rephist.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/or/rephist.c b/src/or/rephist.c index 056fc5cc12..22b3ec5217 100644 --- a/src/or/rephist.c +++ b/src/or/rephist.c @@ -1440,7 +1440,7 @@ rep_hist_fill_bandwidth_history(char *buf, size_t len, bw_array_t *b) * history in its descriptor. */ char * -rep_hist_get_bandwidth_lines(int for_extrainfo) +rep_hist_get_bandwidth_lines(void) { char *buf, *cp; char t[ISO_TIME_LEN+1]; @@ -1474,9 +1474,8 @@ rep_hist_get_bandwidth_lines(int for_extrainfo) } tor_assert(b); format_iso_time(t, b->next_period-NUM_SECS_BW_SUM_INTERVAL); - tor_snprintf(cp, len-(cp-buf), "%s%s %s (%d s) ", - for_extrainfo ? "" : "opt ", desc, t, - NUM_SECS_BW_SUM_INTERVAL); + tor_snprintf(cp, len-(cp-buf), "%s %s (%d s) ", + desc, t, NUM_SECS_BW_SUM_INTERVAL); cp += strlen(cp); cp += rep_hist_fill_bandwidth_history(cp, len-(cp-buf), b); strlcat(cp, "\n", len-(cp-buf)); |