I've determined the exact cause of my trouble. It is a result of using
OpenSSL in conjunction with the pthreads-win32 library, and implementing
id_callback as a call to pthread_self, and may be a gotcha for other Win32
developers.
The pthreads-win32 library implements pthread_self, and other functions,
with a call to the Win32 function TlsGetValue. The Win32 documentation for
this function states:
"Win32 functions that return indications of failure call
SetLastError when they fail. They generally do not call SetLastError when
they succeed. The TlsGetValue function is an exception to this general rule.
The TlsGetValue function calls SetLastError to clear a thread's last error
when it succeeds."
What is occuring in my particular case is that accept returns
WSAEWOULDBLOCK, so BIO_accept calls SYSerr to log an error. Since logging
an error results in a call to the id_callback for storing the thread id with
the error message, the act of logging an error in this case results in the
WSALastError being cleared, and further processing, such as determining if
the operation should be retried, fails.
Regards,
Steven
--
Steven Reddie <[EMAIL PROTECTED]>
Senior Software Engineer
OpenDirectory Lab, Computer Associates Pty Ltd (Australia)
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]