mirror of
https://github.com/glest/glest-source.git
synced 2025-08-21 07:31:21 +02:00
- attempt to fix tomreyns socket fuzzer
This commit is contained in:
@@ -186,7 +186,7 @@ ConnectionSlot::ConnectionSlot(ServerInterface* serverInterface, int playerIndex
|
|||||||
}
|
}
|
||||||
|
|
||||||
ConnectionSlot::~ConnectionSlot() {
|
ConnectionSlot::~ConnectionSlot() {
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s] START\n",__FILE__,__FUNCTION__);
|
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] START\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
|
|
||||||
if(BaseThread::shutdownAndWait(slotThreadWorker) == true) {
|
if(BaseThread::shutdownAndWait(slotThreadWorker) == true) {
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
|
@@ -199,14 +199,18 @@ void ServerInterface::addSlot(int playerIndex) {
|
|||||||
|
|
||||||
MutexSafeWrapper safeMutexSlot(&slotAccessorMutexes[playerIndex],intToStr(__LINE__) + "_" + intToStr(playerIndex));
|
MutexSafeWrapper safeMutexSlot(&slotAccessorMutexes[playerIndex],intToStr(__LINE__) + "_" + intToStr(playerIndex));
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
delete slots[playerIndex];
|
ConnectionSlot *slot = slots[playerIndex];
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
if(slot != NULL) {
|
||||||
|
slots[playerIndex]=NULL;
|
||||||
|
}
|
||||||
|
|
||||||
slots[playerIndex]= new ConnectionSlot(this, playerIndex);
|
slots[playerIndex]= new ConnectionSlot(this, playerIndex);
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
|
|
||||||
safeMutexSlot.ReleaseLock();
|
safeMutexSlot.ReleaseLock();
|
||||||
|
|
||||||
|
delete slot;
|
||||||
|
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
|
|
||||||
safeMutex.ReleaseLock();
|
safeMutex.ReleaseLock();
|
||||||
|
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
@@ -290,7 +294,6 @@ void ServerInterface::removeSlot(int playerIndex,int lockedSlotIndex) {
|
|||||||
}
|
}
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s] Line: %d playerIndex = %d\n",__FILE__,__FUNCTION__,__LINE__,playerIndex);
|
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s] Line: %d playerIndex = %d\n",__FILE__,__FUNCTION__,__LINE__,playerIndex);
|
||||||
|
|
||||||
delete slots[playerIndex];
|
|
||||||
slots[playerIndex]= NULL;
|
slots[playerIndex]= NULL;
|
||||||
|
|
||||||
safeMutexSlot.ReleaseLock();
|
safeMutexSlot.ReleaseLock();
|
||||||
@@ -298,6 +301,10 @@ void ServerInterface::removeSlot(int playerIndex,int lockedSlotIndex) {
|
|||||||
|
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s] Line: %d playerIndex = %d\n",__FILE__,__FUNCTION__,__LINE__,playerIndex);
|
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s] Line: %d playerIndex = %d\n",__FILE__,__FUNCTION__,__LINE__,playerIndex);
|
||||||
|
|
||||||
|
delete slot;
|
||||||
|
|
||||||
|
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s] Line: %d playerIndex = %d\n",__FILE__,__FUNCTION__,__LINE__,playerIndex);
|
||||||
|
|
||||||
updateListen();
|
updateListen();
|
||||||
|
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s] Line: %d playerIndex = %d\n",__FILE__,__FUNCTION__,__LINE__,playerIndex);
|
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s] Line: %d playerIndex = %d\n",__FILE__,__FUNCTION__,__LINE__,playerIndex);
|
||||||
|
Reference in New Issue
Block a user