gnutls-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: gnutls_handshake crash on multithreading


From: Vasiliy Ivanov
Subject: RE: gnutls_handshake crash on multithreading
Date: Tue, 16 Feb 2010 21:46:54 +0200

No, it's my own structure(see below).
It works at program start, but no methods are called at gnutls_handshake 
processing.

static int boost_mutex_init(void **priv)
{
        boost::mutex *lock = new boost::mutex();
        if (!lock)
                return ENOMEM;
        *priv = lock;
        return 0;
}

static int boost_mutex_destroy(void **lock)
{
        delete reinterpret_cast<boost::mutex*>(*lock);
        return 0;
}

static int boost_mutex_lock(void **lock)
{
        reinterpret_cast<boost::mutex*>(*lock)->lock();
        return 0;
}

static int boost_mutex_unlock(void **lock)
{
        reinterpret_cast<boost::mutex*>(*lock)->unlock();
        return 0;
}
//static struct gcry_thread_cbs gcry_threads_other;
static struct gcry_thread_cbs gcry_threads_boost =
{ 
        GCRY_THREAD_OPTION_USER, 
        NULL,
        boost_mutex_init, 
        boost_mutex_destroy,
        boost_mutex_lock, 
        boost_mutex_unlock
};



-----Original Message-----
From: address@hidden [mailto:address@hidden On Behalf Of Tor Lillqvist
Sent: Tuesday, February 16, 2010 3:03 PM
To: Vasiliy Ivanov
Cc: Simon Josefsson; address@hidden
Subject: Re: gnutls_handshake crash on multithreading

>                gcry_control( GCRYCTL_SET_THREAD_CBS, 
> &gcry_threads_boost );

> I use .dll with .lib file linked.

Where does gcry_threads_boost come from, if from a DLL are you sure it is 
imported correctly?

--tml





reply via email to

[Prev in Thread] Current Thread [Next in Thread]