X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Ferr%2Ferr_prn.c;h=a0168ac8ed628fd4d511059d68b0bffaebad92ed;hb=cd91fd7c32428c0deb503f19b8061e0980476876;hp=2224a901e5ea30a30e4332f2290c980faf20cc1b;hpb=5f834ab123af6444b7cffe21849e434ad6479f8a;p=oweals%2Fopenssl.git diff --git a/crypto/err/err_prn.c b/crypto/err/err_prn.c index 2224a901e5..a0168ac8ed 100644 --- a/crypto/err/err_prn.c +++ b/crypto/err/err_prn.c @@ -72,14 +72,17 @@ void ERR_print_errors_cb(int (*cb)(const char *str, size_t len, void *u), const char *file,*data; int line,flags; unsigned long es; + CRYPTO_THREADID cur; - es=CRYPTO_thread_id(); + CRYPTO_THREADID_current(&cur); + es=CRYPTO_THREADID_hash(&cur); while ((l=ERR_get_error_line_data(&file,&line,&data,&flags)) != 0) { ERR_error_string_n(l, buf, sizeof buf); BIO_snprintf(buf2, sizeof(buf2), "%lu:%s:%s:%d:%s\n", es, buf, file, line, (flags & ERR_TXT_STRING) ? data : ""); - cb(buf2, strlen(buf2), u); + if (cb(buf2, strlen(buf2), u) <= 0) + break; /* abort outputting the error report */ } }