Commit 324d376b authored by Pekka Pessi's avatar Pekka Pessi

tport_tls.c: cleared confused logging levels

darcs-hash:20080201151025-65a35-e6380ee36907b5ecd73c09d1db1d764f311e5d03.gz
parent 92d42269
......@@ -104,15 +104,16 @@ void tls_log_errors(unsigned level, char const *s, unsigned long e)
if (!tport_log->log_init)
su_log_init(tport_log);
if (s == NULL) s = "tls";
for (; e != 0; e = ERR_get_error()) {
if (level >= tport_log->log_level) {
char buf[128];
ERR_error_string_n(e, buf, sizeof buf);
if (s)
su_llog(tport_log, level, "%s: %s", s, buf);
else
su_llog(tport_log, level, "%s", buf);
if (level <= tport_log->log_level) {
const char *error = ERR_lib_error_string(e);
const char *func = ERR_func_error_string(e);
const char *reason = ERR_reason_error_string(e);
su_llog(tport_log, level, "%s: %08lx:%s:%s:%s\n",
s, e, error, func, reason);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment