mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-26 16:09:35 -05:00
Initialized member mTid of class bdThread.
RetroShare crashes on start, when the initial address on port 7812 is in use. The thread in UdpLayer::openSocket was not started and the member mTid was uninitialized. Then a call to join in UdpLayer::reset during the load of the configuration crashes. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3337 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
cfd4eaad37
commit
e71b1c249f
@ -65,7 +65,14 @@ pthread_t createThread(bdThread &thread);
|
||||
class bdThread
|
||||
{
|
||||
public:
|
||||
bdThread() { return; }
|
||||
bdThread()
|
||||
{
|
||||
#if defined(_WIN32) || defined(__MINGW32__)
|
||||
memset (&mTid, 0, sizeof(mTid));
|
||||
#else
|
||||
mTid = 0;
|
||||
#endif
|
||||
}
|
||||
virtual ~bdThread() { return; }
|
||||
|
||||
virtual void start() { createThread(*this); }
|
||||
|
Loading…
Reference in New Issue
Block a user