summaryrefslogtreecommitdiff
path: root/src/or/rendcommon.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-09-09 19:54:28 +0000
committerRoger Dingledine <arma@torproject.org>2005-09-09 19:54:28 +0000
commit35b78b2d8eff5dd54461529d9dd97b53bb1dec1f (patch)
tree355454ec63765ef9c6c2c4dcb4b1551bc4fc2117 /src/or/rendcommon.c
parent0de64f224e938cbe7f4b4d7c1f116472169af5f6 (diff)
downloadtor-35b78b2d8eff5dd54461529d9dd97b53bb1dec1f.tar.gz
tor-35b78b2d8eff5dd54461529d9dd97b53bb1dec1f.zip
clean up the rendezvous warn log msgs, and downgrade some to info
svn:r4964
Diffstat (limited to 'src/or/rendcommon.c')
-rw-r--r--src/or/rendcommon.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/or/rendcommon.c b/src/or/rendcommon.c
index 6b101a2150..bbf121f84a 100644
--- a/src/or/rendcommon.c
+++ b/src/or/rendcommon.c
@@ -175,7 +175,7 @@ rend_parse_service_descriptor(const char *str, size_t len)
cp += 8+DIGEST_LEN;
if (end-cp < klen) goto truncated;
if (!(info->onion_key = crypto_pk_asn1_decode(cp,klen))) {
- log_fn(LOG_WARN, "error decoding onion key for intro point");
+ log_fn(LOG_WARN, "Internal error decoding onion key for intro point.");
goto error;
}
cp += klen;
@@ -185,20 +185,20 @@ rend_parse_service_descriptor(const char *str, size_t len)
tor_assert(end-cp >= 0);
if ((size_t)(end-cp) < keylen) goto truncated;
if ((size_t)(end-cp) > keylen) {
- log_fn(LOG_WARN, "Signature too long on service descriptor");
+ log_fn(LOG_WARN, "Signature too long on service descriptor.");
goto error;
}
if (crypto_pk_public_checksig_digest(result->pk,
(char*)str,cp-str, /* data */
(char*)cp,end-cp /* signature*/
)<0) {
- log_fn(LOG_WARN, "Bad signature on service descriptor");
+ log_fn(LOG_WARN, "Bad signature on service descriptor.");
goto error;
}
return result;
truncated:
- log_fn(LOG_WARN, "Truncated service descriptor");
+ log_fn(LOG_WARN, "Truncated service descriptor.");
error:
rend_service_descriptor_free(result);
return NULL;
@@ -357,35 +357,35 @@ rend_cache_store(const char *desc, size_t desc_len)
tor_assert(rend_cache);
parsed = rend_parse_service_descriptor(desc,desc_len);
if (!parsed) {
- log_fn(LOG_WARN,"Couldn't parse service descriptor");
+ log_fn(LOG_WARN,"Couldn't parse service descriptor.");
return -1;
}
if (rend_get_service_id(parsed->pk, query)<0) {
- log_fn(LOG_WARN,"Couldn't compute service ID");
+ log_fn(LOG_WARN,"Couldn't compute service ID.");
rend_service_descriptor_free(parsed);
return -1;
}
tor_snprintf(key, sizeof(key), "%c%s", parsed->version?'1':'0', query);
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", safe_str(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",
+ 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, key);
if (e && e->parsed->timestamp > parsed->timestamp) {
- log_fn(LOG_INFO,"We already have a newer service descriptor %s with the same ID and version", safe_str(query));
+ log_fn(LOG_INFO,"We already have a newer service descriptor %s with the same ID and version.", 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", safe_str(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;
@@ -403,7 +403,7 @@ 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",
+ log_fn(LOG_INFO,"Successfully stored rend desc '%s', len %d.",
safe_str(query), (int)desc_len);
return 1;
}