- more logging to track down cold's issue
This commit is contained in:
parent
2572fcf561
commit
eee0d0ab2e
|
@ -41,6 +41,9 @@ bool NetworkMessage::receive(Socket* socket, void* data, int dataSize, bool tryR
|
|||
if(socket != NULL) {
|
||||
int dataReceived = socket->receive(data, dataSize, tryReceiveUntilDataSizeMet);
|
||||
if(dataReceived != dataSize) {
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] WARNING, dataReceived = %d dataSize = %d\n",__FILE__,__FUNCTION__,__LINE__,dataReceived,dataSize);
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("\nIn [%s::%s Line: %d] WARNING, dataReceived = %d dataSize = %d\n",__FILE__,__FUNCTION__,__LINE__,dataReceived,dataSize);
|
||||
|
||||
if(socket != NULL && socket->getSocketId() > 0) {
|
||||
throw megaglest_runtime_error("Error receiving NetworkMessage, dataReceived = " + intToStr(dataReceived) + ", dataSize = " + intToStr(dataSize));
|
||||
}
|
||||
|
|
|
@ -265,10 +265,11 @@ int32 Checksum::getSum() {
|
|||
Checksum newResult;
|
||||
|
||||
{
|
||||
MutexSafeWrapper safeMutexSocketDestructorFlag(&Checksum::fileListCacheSynchAccessor,string(__FILE__) + "_" + intToStr(__LINE__));
|
||||
|
||||
for(std::map<string,int32>::iterator iterMap = fileList.begin();
|
||||
iterMap != fileList.end(); ++iterMap) {
|
||||
|
||||
MutexSafeWrapper safeMutexSocketDestructorFlag(&Checksum::fileListCacheSynchAccessor,string(__FILE__) + "_" + intToStr(__LINE__));
|
||||
if(Checksum::fileListCache.find(iterMap->first) == Checksum::fileListCache.end()) {
|
||||
Checksum fileResult;
|
||||
bool fileAddedOk = fileResult.addFileToSum(iterMap->first);
|
||||
|
@ -281,6 +282,9 @@ int32 Checksum::getSum() {
|
|||
newResult.addSum(Checksum::fileListCache[iterMap->first]);
|
||||
}
|
||||
}
|
||||
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] fileList.size() = %d\n",__FILE__,__FUNCTION__,__LINE__,fileList.size());
|
||||
|
||||
return newResult.getSum();
|
||||
}
|
||||
return sum;
|
||||
|
|
Loading…
Reference in New Issue
Block a user