From 4cdfe669de129ee2287d6fa7d4f9e170ca04ab2f Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 11 May 2008 23:39:12 +0000 Subject: fixed some thread safety bugs --- src/anytun.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/anytun.cpp') diff --git a/src/anytun.cpp b/src/anytun.cpp index f87628e..64da130 100644 --- a/src/anytun.cpp +++ b/src/anytun.cpp @@ -355,14 +355,16 @@ bool initLibGCrypt() gcry_error_t err = gcry_control (GCRYCTL_DISABLE_SECMEM, 0); if( err ) { - std::cout << "initLibGCrypt: Failed to disable secure memory: " << gpg_strerror( err ) << std::endl; + char buf[NL_TEXTMAX]; + std::cout << "initLibGCrypt: Failed to disable secure memory: " << gpg_strerror_r(err, buf, NL_TEXTMAX) << std::endl; return false; } // Tell Libgcrypt that initialization has completed. err = gcry_control(GCRYCTL_INITIALIZATION_FINISHED); if( err ) { - std::cout << "initLibGCrypt: Failed to finish the initialization of libgcrypt: " << gpg_strerror( err ) << std::endl; + char buf[NL_TEXTMAX]; + std::cout << "initLibGCrypt: Failed to finish initialization: " << gpg_strerror_r(err, buf, NL_TEXTMAX) << std::endl; return false; } -- cgit v1.2.3