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

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) ...@@ -104,15 +104,16 @@ void tls_log_errors(unsigned level, char const *s, unsigned long e)
if (!tport_log->log_init) if (!tport_log->log_init)
su_log_init(tport_log); su_log_init(tport_log);
if (s == NULL) s = "tls";
for (; e != 0; e = ERR_get_error()) { for (; e != 0; e = ERR_get_error()) {
if (level >= tport_log->log_level) { if (level <= tport_log->log_level) {
char buf[128]; const char *error = ERR_lib_error_string(e);
ERR_error_string_n(e, buf, sizeof buf); const char *func = ERR_func_error_string(e);
const char *reason = ERR_reason_error_string(e);
if (s)
su_llog(tport_log, level, "%s: %s", s, buf); su_llog(tport_log, level, "%s: %08lx:%s:%s:%s\n",
else s, e, error, func, reason);
su_llog(tport_log, level, "%s", buf);
} }
} }
} }
......
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