Index: src/libchcore/TOverlappedWriterFB.cpp =================================================================== diff -u -N -rc719644bb4360fcf7ccf6f1139bcae852bd6effd -rc175b6c9d5be6ee6ee0eae90abb167b9eaf2abc3 --- src/libchcore/TOverlappedWriterFB.cpp (.../TOverlappedWriterFB.cpp) (revision c719644bb4360fcf7ccf6f1139bcae852bd6effd) +++ src/libchcore/TOverlappedWriterFB.cpp (.../TOverlappedWriterFB.cpp) (revision c175b6c9d5be6ee6ee0eae90abb167b9eaf2abc3) @@ -48,7 +48,8 @@ m_eventProcessingFinished(true, false), m_eventWritingFinished(true, false), m_counterOnTheFly(), - m_rThreadController(rThreadController) + m_rThreadController(rThreadController), + m_spLog(logger::MakeLogger(spLogFileData, L"File-Writer")) { if(!spFilesystem) throw TCoreException(eErr_InvalidArgument, L"spFilesystem is NULL", LOCATION); @@ -77,12 +78,6 @@ if(!pBuffer) throw TCoreException(eErr_InternalProblem, L"Write was possible, but no buffer is available", LOCATION); - if(m_bReleaseMode) - { - m_spWriter->AddEmptyBuffer(pBuffer); - return TSubTaskBase::eSubResult_Continue; - } - m_counterOnTheFly.Increase(); pBuffer->SetParam(this); @@ -99,12 +94,6 @@ if(!pBuffer) throw TCoreException(eErr_InternalProblem, L"Failed to retrieve write failed buffer", LOCATION); - if(m_bReleaseMode) - { - m_spWriter->AddEmptyBuffer(pBuffer); - return TSubTaskBase::eSubResult_Continue; - } - TSubTaskBase::ESubOperationResult eResult = m_spDstFile->HandleWriteError(*pBuffer); if(eResult == TSubTaskBase::eSubResult_Retry) { @@ -126,15 +115,6 @@ file_size_t fsWritten = pBuffer->GetRealDataSize(); - if(m_bReleaseMode) - { - AdjustProcessedSize(fsWritten); - - m_spWriter->AddEmptyBuffer(pBuffer); - - return TSubTaskBase::eSubResult_Continue; - } - TSubTaskBase::ESubOperationResult eResult = TSubTaskBase::eSubResult_Continue; if(pBuffer->IsLastPart()) { @@ -366,6 +346,8 @@ WaitForOnTheFlyBuffers(); ClearBuffers(); + + LOG_DEBUG(m_spLog) << L"Writer stopping processing. Max on-the-fly requests: " << m_counterOnTheFly.GetMaxUsed(); if(m_eThreadResult == TSubTaskBase::eSubResult_Continue && bWrittenLastBuffer) m_eventWritingFinished.SetEvent();