- Attempt to use libcurl in a thread safe manner

This commit is contained in:
Mark Vejvoda
2010-06-23 14:49:20 +00:00
parent e0b9089eeb
commit 87b4706940
14 changed files with 220 additions and 158 deletions

View File

@@ -708,6 +708,7 @@ float Socket::getThreadedPingMS(std::string host) {
if(pingThread == NULL) {
lastThreadedPing = 0;
pingThread = new SimpleTaskThread(this,0,50);
pingThread->setUniqueID(__FILE__ + "_" + __FUNCTION);
pingThread->start();
}
@@ -1216,6 +1217,7 @@ void ClientSocket::startBroadCastClientThread(DiscoveredServersInterface *cb) {
ClientSocket::stopBroadCastClientThread();
broadCastClientThread = new BroadCastClientSocketThread(cb);
broadCastClientThread->setUniqueID(string(__FILE__) + string("_") + string(__FUNCTION__));
broadCastClientThread->start();
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
@@ -1495,6 +1497,7 @@ void ServerSocket::startBroadCastThread() {
stopBroadCastThread();
broadCastThread = new BroadCastSocketThread();
broadCastThread->setUniqueID(string(__FILE__) + string("_") + string(__FUNCTION__));
broadCastThread->start();
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);