summaryrefslogtreecommitdiffstats
path: root/crypto/err/err_prn.c
diff options
context:
space:
mode:
authorGeoff Thorpe <geoff@openssl.org>2008-08-06 15:54:15 +0000
committerGeoff Thorpe <geoff@openssl.org>2008-08-06 15:54:15 +0000
commit4c3296960de32e5abfbb8f4703a2ce624d82669f (patch)
treef603740bcbf0e3cde6008cead9586e5b4edbdc5b /crypto/err/err_prn.c
parent96826bfc84c63207b720543443626029946a0fc7 (diff)
Remove the dual-callback scheme for numeric and pointer thread IDs,
deprecate the original (numeric-only) scheme, and replace with the CRYPTO_THREADID object. This hides the platform-specifics and should reduce the possibility for programming errors (where failing to explicitly check both thread ID forms could create subtle, platform-specific bugs). Thanks to Bodo, for invaluable review and feedback.
Diffstat (limited to 'crypto/err/err_prn.c')
-rw-r--r--crypto/err/err_prn.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/err/err_prn.c b/crypto/err/err_prn.c
index 2224a901e5..de32f332c4 100644
--- a/crypto/err/err_prn.c
+++ b/crypto/err/err_prn.c
@@ -72,8 +72,10 @@ 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);