r9032@Kushana: nickm | 2006-09-29 18:51:42 -0400

Now, all log messages should be distinct.


svn:r8545
This commit is contained in:
Nick Mathewson 2006-09-29 22:51:47 +00:00
parent 8af07e817e
commit c2d304366b
5 changed files with 15 additions and 10 deletions

View File

@ -217,7 +217,7 @@ tor_gzip_uncompress(char **out, size_t *out_len,
goto err;
}
if (inflateInit2(stream, method_bits(method)) != Z_OK) {
log_warn(LD_GENERAL, "Error from inflateInit2: %s",
log_warn(LD_GENERAL, "Error from second inflateInit2: %s",
stream->msg?stream->msg:"<no message>");
goto err;
}

View File

@ -589,7 +589,8 @@ connection_edge_end_reason_socks5_response(int reason)
case END_STREAM_REASON_NET_UNREACHABLE:
return SOCKS5_NET_UNREACHABLE;
default:
log_warn(LD_PROTOCOL,"Reason for ending (%d) not recognized.",reason);
log_warn(LD_PROTOCOL,"Reason for ending (%d) not recognized; "
"sending generic socks error.",reason);
return SOCKS5_GENERAL_ERROR;
}
}

View File

@ -345,7 +345,8 @@ rend_service_load_keys(void)
/* Load key */
if (strlcpy(fname,s->directory,sizeof(fname)) >= sizeof(fname) ||
strlcat(fname,"/private_key",sizeof(fname)) >= sizeof(fname)) {
log_warn(LD_CONFIG, "Directory name too long: \"%s\".", s->directory);
log_warn(LD_CONFIG, "Directory name too long to store key file: \"%s\".",
s->directory);
return -1;
}
s->private_key = init_key_from_file(fname);
@ -363,7 +364,8 @@ rend_service_load_keys(void)
}
if (strlcpy(fname,s->directory,sizeof(fname)) >= sizeof(fname) ||
strlcat(fname,"/hostname",sizeof(fname)) >= sizeof(fname)) {
log_warn(LD_CONFIG, "Directory name too long: \"%s\".", s->directory);
log_warn(LD_CONFIG, "Directory name too long to store hostname file:"
" \"%s\".", s->directory);
return -1;
}
tor_snprintf(buf, sizeof(buf),"%s.onion\n", s->service_id);

View File

@ -127,7 +127,7 @@ rotate_onion_key(void)
tor_snprintf(fname_prev,sizeof(fname_prev),
"%s/keys/secret_onion_key.old",get_options()->DataDirectory);
if (!(prkey = crypto_new_pk_env())) {
log_err(LD_GENERAL,"Error creating crypto environment.");
log_err(LD_GENERAL,"Error constructing rotated onion key");
goto error;
}
if (crypto_pk_generate_key(prkey)) {
@ -187,7 +187,7 @@ init_key_from_file(const char *fname)
FILE *file = NULL;
if (!(prkey = crypto_new_pk_env())) {
log_err(LD_GENERAL,"Error creating crypto environment.");
log_err(LD_GENERAL,"Error constructing key");
goto error;
}

View File

@ -1016,12 +1016,14 @@ routerstatus_parse_entry_from_string(const char **s, smartlist_t *tokens)
strlcpy(rs->nickname, tok->args[0], sizeof(rs->nickname));
if (digest_from_base64(rs->identity_digest, tok->args[1])) {
log_warn(LD_DIR, "Error decoding digest %s", escaped(tok->args[1]));
log_warn(LD_DIR, "Error decoding identity digest %s",
escaped(tok->args[1]));
goto err;
}
if (digest_from_base64(rs->descriptor_digest, tok->args[2])) {
log_warn(LD_DIR, "Error decoding digest %s", escaped(tok->args[2]));
log_warn(LD_DIR, "Error decoding descriptor digest %s",
escaped(tok->args[2]));
goto err;
}
@ -1747,7 +1749,7 @@ router_get_hash_impl(const char *s, char *digest,
char *start, *end;
start = strstr(s, start_str);
if (!start) {
log_warn(LD_DIR,"couldn't find \"%s\"",start_str);
log_warn(LD_DIR,"couldn't find start of hashed material \"%s\"",start_str);
return -1;
}
if (start != s && *(start-1) != '\n') {
@ -1758,7 +1760,7 @@ router_get_hash_impl(const char *s, char *digest,
}
end = strstr(start+strlen(start_str), end_str);
if (!end) {
log_warn(LD_DIR,"couldn't find \"%s\"",end_str);
log_warn(LD_DIR,"couldn't find end of hashed material \"%s\"",end_str);
return -1;
}
end = strchr(end+strlen(end_str), '\n');