From: Nick Mathewson Date: Sun, 24 Jan 2010 01:46:57 +0000 (-0500) Subject: Merge remote branch 'origin/maint-0.2.1' X-Git-Tag: tor-0.2.2.8-alpha~9 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3b4b6009a0020fb55fcb6464cc448e244680f9c8;p=thirdparty%2Ftor.git Merge remote branch 'origin/maint-0.2.1' --- 3b4b6009a0020fb55fcb6464cc448e244680f9c8 diff --cc src/common/tortls.c index 86f07a270a,beab5356c5..4bb2291b1f --- a/src/common/tortls.c +++ b/src/common/tortls.c @@@ -198,17 -179,17 +198,19 @@@ tls_log_errors(tor_tls_t *tls, int seve msg = (const char*)ERR_reason_error_string(err); lib = (const char*)ERR_lib_error_string(err); func = (const char*)ERR_func_error_string(err); + if (!state) + state = (st>=0)?ssl_state_to_string(st):"---"; if (!msg) msg = "(null)"; + if (!lib) lib = "(null)"; + if (!func) func = "(null)"; if (doing) { - log(severity, LD_NET, "TLS error while %s%s%s: %s (in %s:%s)", + log(severity, domain, "TLS error while %s%s%s: %s (in %s:%s:%s)", doing, addr?" with ":"", addr?addr:"", - msg, lib, func); + msg, lib, func, state); } else { - log(severity, LD_NET, "TLS error%s%s: %s (in %s:%s)", + log(severity, domain, "TLS error%s%s: %s (in %s:%s:%s)", addr?" with ":"", addr?addr:"", - msg, lib, func); + msg, lib, func, state); } } } diff --cc src/or/router.c index e14f237728,97f411dcd6..827df0302c --- a/src/or/router.c +++ b/src/or/router.c @@@ -1377,11 -1380,11 +1377,12 @@@ router_rebuild_descriptor(int force ei->cache_info.published_on = ri->cache_info.published_on; memcpy(ei->cache_info.identity_digest, ri->cache_info.identity_digest, DIGEST_LEN); - ei->cache_info.signed_descriptor_body = tor_malloc(8192); - if (extrainfo_dump_to_string(ei->cache_info.signed_descriptor_body, 8192, - ei, get_identity_key()) < 0) { + ei_size = options->ExtraInfoStatistics ? MAX_EXTRAINFO_UPLOAD_SIZE : 8192; + ei->cache_info.signed_descriptor_body = tor_malloc(ei_size); + if (extrainfo_dump_to_string(ei->cache_info.signed_descriptor_body, + ei_size, ei, get_identity_key()) < 0) { log_warn(LD_BUG, "Couldn't generate extra-info descriptor."); + routerinfo_free(ri); extrainfo_free(ei); return -1; }