aboutsummaryrefslogtreecommitdiff
path: root/src/or/rendcommon.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-05-03 10:04:08 +0000
committerRoger Dingledine <arma@torproject.org>2005-05-03 10:04:08 +0000
commit5265bbd2b8f4a28f26eabb48a4d167b765780b26 (patch)
tree9e3ee23068a617dc137f0fa203adb8b21c8a8c30 /src/or/rendcommon.c
parentb35f7dacef6b5e4215dfba9a4088a73421fb103c (diff)
downloadtor-5265bbd2b8f4a28f26eabb48a4d167b765780b26.tar
tor-5265bbd2b8f4a28f26eabb48a4d167b765780b26.tar.gz
first iteration of scrubbing sensitive strings from logs.
also generally clean up log messages. svn:r4174
Diffstat (limited to 'src/or/rendcommon.c')
-rw-r--r--src/or/rendcommon.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/or/rendcommon.c b/src/or/rendcommon.c
index 29028f4f7..302066331 100644
--- a/src/or/rendcommon.c
+++ b/src/or/rendcommon.c
@@ -280,23 +280,24 @@ int rend_cache_store(const char *desc, size_t desc_len)
}
now = time(NULL);
if (parsed->timestamp < now-REND_CACHE_MAX_AGE-REND_CACHE_MAX_SKEW) {
- log_fn(LOG_WARN,"Service descriptor %s is too old", query);
+ log_fn(LOG_WARN,"Service descriptor %s is too old", safe_str(query));
rend_service_descriptor_free(parsed);
return -1;
}
if (parsed->timestamp > now+REND_CACHE_MAX_SKEW) {
- log_fn(LOG_WARN,"Service descriptor %s is too far in the future", query);
+ log_fn(LOG_WARN,"Service descriptor %s is too far in the future",
+ safe_str(query));
rend_service_descriptor_free(parsed);
return -1;
}
e = (rend_cache_entry_t*) strmap_get_lc(rend_cache, query);
if (e && e->parsed->timestamp > parsed->timestamp) {
- log_fn(LOG_INFO,"We already have a newer service descriptor %s with the same ID", query);
+ log_fn(LOG_INFO,"We already have a newer service descriptor %s with the same ID", safe_str(query));
rend_service_descriptor_free(parsed);
return 0;
}
if (e && e->len == desc_len && !memcmp(desc,e->desc,desc_len)) {
- log_fn(LOG_INFO,"We already have this service descriptor %s", query);
+ log_fn(LOG_INFO,"We already have this service descriptor %s", safe_str(query));
e->received = time(NULL);
rend_service_descriptor_free(parsed);
return 0;
@@ -314,7 +315,8 @@ int rend_cache_store(const char *desc, size_t desc_len)
e->desc = tor_malloc(desc_len);
memcpy(e->desc, desc, desc_len);
- log_fn(LOG_INFO,"Successfully stored rend desc '%s', len %d", query, (int)desc_len);
+ log_fn(LOG_INFO,"Successfully stored rend desc '%s', len %d",
+ safe_str(query), (int)desc_len);
return 1;
}