#include <dali/integration-api/debug.h>
#include <pthread.h>
#include <curl/curl.h>
-#include <openssl/crypto.h>
#include <cstring>
// INTERNAL INCLUDES
}
}
-unsigned long CurlEnvironment::GetThreadId()
+void CurlEnvironment::GetThreadId( CRYPTO_THREADID* tid )
{
// If dali uses c++ thread, we may replace pthread_self() to this_thread::get_id()
- return static_cast< unsigned long >( pthread_self() );
+ CRYPTO_THREADID_set_numeric( tid, static_cast< unsigned long > ( pthread_self() ) );
}
void CurlEnvironment::SetLockingFunction()
mMutexs = new std::mutex[ CRYPTO_num_locks() ];
- CRYPTO_set_id_callback( &CurlEnvironment::GetThreadId );
+ CRYPTO_THREADID_set_callback( &CurlEnvironment::GetThreadId );
CRYPTO_set_locking_callback( &CurlEnvironment::OnOpenSSLLocking );
}
return;
}
- CRYPTO_set_id_callback( NULL );
+ CRYPTO_THREADID_set_callback( NULL );
CRYPTO_set_locking_callback( NULL );
delete [] mMutexs;
mMutexs = NULL;
#include <string>
#include <mutex> //c++11
#include <stdint.h> // uint8
+#include <openssl/crypto.h>
namespace Dali
{
/**
* Gets thread id for libcurl with openssl
*/
- static unsigned long GetThreadId();
+ static void GetThreadId( CRYPTO_THREADID* tid );
private: