mirror of
https://github.com/glest/glest-source.git
synced 2025-08-18 06:01:17 +02:00
- more logging to track down cold's issue
This commit is contained in:
@@ -1435,6 +1435,10 @@ int Socket::receive(void *data, int dataSize, bool tryReceiveUntilDataSizeMet) {
|
|||||||
|
|
||||||
char *dataAsCharPointer = reinterpret_cast<char *>(data);
|
char *dataAsCharPointer = reinterpret_cast<char *>(data);
|
||||||
int additionalBytes = receive(&dataAsCharPointer[bytesReceived], newBufferSize, tryReceiveUntilDataSizeMet);
|
int additionalBytes = receive(&dataAsCharPointer[bytesReceived], newBufferSize, tryReceiveUntilDataSizeMet);
|
||||||
|
|
||||||
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] WARNING, additionalBytes = %d\n",__FILE__,__FUNCTION__,__LINE__,additionalBytes);
|
||||||
|
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("\nIn [%s::%s Line: %d] WARNING, additionalBytes = %d\n",__FILE__,__FUNCTION__,__LINE__,additionalBytes);
|
||||||
|
|
||||||
if(additionalBytes > 0) {
|
if(additionalBytes > 0) {
|
||||||
bytesReceived += additionalBytes;
|
bytesReceived += additionalBytes;
|
||||||
}
|
}
|
||||||
|
@@ -263,10 +263,12 @@ int32 Checksum::getSum() {
|
|||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] fileList.size() = %d\n",__FILE__,__FUNCTION__,__LINE__,fileList.size());
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] fileList.size() = %d\n",__FILE__,__FUNCTION__,__LINE__,fileList.size());
|
||||||
|
|
||||||
Checksum newResult;
|
Checksum newResult;
|
||||||
|
|
||||||
|
{
|
||||||
|
MutexSafeWrapper safeMutexSocketDestructorFlag(&Checksum::fileListCacheSynchAccessor,string(__FILE__) + "_" + intToStr(__LINE__));
|
||||||
for(std::map<string,int32>::iterator iterMap = fileList.begin();
|
for(std::map<string,int32>::iterator iterMap = fileList.begin();
|
||||||
iterMap != fileList.end(); ++iterMap) {
|
iterMap != fileList.end(); ++iterMap) {
|
||||||
|
|
||||||
MutexSafeWrapper safeMutexSocketDestructorFlag(&Checksum::fileListCacheSynchAccessor,string(__FILE__) + "_" + intToStr(__LINE__));
|
|
||||||
if(Checksum::fileListCache.find(iterMap->first) == Checksum::fileListCache.end()) {
|
if(Checksum::fileListCache.find(iterMap->first) == Checksum::fileListCache.end()) {
|
||||||
Checksum fileResult;
|
Checksum fileResult;
|
||||||
bool fileAddedOk = fileResult.addFileToSum(iterMap->first);
|
bool fileAddedOk = fileResult.addFileToSum(iterMap->first);
|
||||||
@@ -278,6 +280,7 @@ int32 Checksum::getSum() {
|
|||||||
}
|
}
|
||||||
newResult.addSum(Checksum::fileListCache[iterMap->first]);
|
newResult.addSum(Checksum::fileListCache[iterMap->first]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return newResult.getSum();
|
return newResult.getSum();
|
||||||
}
|
}
|
||||||
return sum;
|
return sum;
|
||||||
|
Reference in New Issue
Block a user