- added more socket threaded protection and output curl version if ftp transfers fail

This commit is contained in:
Mark Vejvoda
2011-01-01 10:16:25 +00:00
parent 8e42035257
commit 48ab8b7b32
5 changed files with 36 additions and 11 deletions

View File

@@ -345,11 +345,16 @@ void ServerInterface::updateSlot(ConnectionSlotEvent *event) {
bool checkForNewClients = true;
// Safety check since we can experience a disconnect and the slot is NULL
MutexSafeWrapper safeMutexSlot(&slotAccessorMutexes[event->triggerId],intToStr(__LINE__) + "_" + intToStr(event->triggerId));
ConnectionSlot *connectionSlot = NULL;
MutexSafeWrapper safeMutexSlot(NULL);
if(event->triggerId >= 0 && event->triggerId < GameConstants::maxPlayers) {
safeMutexSlot.setMutex(&slotAccessorMutexes[event->triggerId],intToStr(__LINE__) + "_" + intToStr(event->triggerId));
connectionSlot = slots[event->triggerId];
}
else {
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] ERROR CONDITION, event->triggerId = %d\n",__FILE__,__FUNCTION__,__LINE__,event->triggerId);
SystemFlags::OutputDebug(SystemFlags::debugError,"In [%s::%s Line: %d] ERROR CONDITION, event->triggerId = %d\n",__FILE__,__FUNCTION__,__LINE__,event->triggerId);
}
if(connectionSlot != NULL &&
(gameHasBeenInitiated == false ||