Skip to content
Snippets Groups Projects
Commit 1f9c2e8a authored by Marco De Marco's avatar Marco De Marco
Browse files

File transfer minor fix

parent 523493c3
No related branches found
No related tags found
No related merge requests found
...@@ -163,7 +163,7 @@ void PlainSession::startWriteResponse() ...@@ -163,7 +163,7 @@ void PlainSession::startWriteResponse()
//============================================================================== //==============================================================================
void PlainSession::startWriteData() void PlainSession::startWriteData()
{ {
DEBUG_STREAM << "PlainSession::startWriteData()" << endl; //DEBUG_STREAM << "PlainSession::startWriteData()" << endl;
try try
{ {
...@@ -173,7 +173,7 @@ void PlainSession::startWriteData() ...@@ -173,7 +173,7 @@ void PlainSession::startWriteData()
{ {
int leftToRead = m_inputStreamSize - m_inputStream.tellg(); int leftToRead = m_inputStreamSize - m_inputStream.tellg();
DEBUG_STREAM << "PlainSession::startWriteData() left to read " << leftToRead << endl; //DEBUG_STREAM << "PlainSession::startWriteData() left to read " << leftToRead << endl;
int bufferSize = 0; int bufferSize = 0;
...@@ -182,7 +182,7 @@ void PlainSession::startWriteData() ...@@ -182,7 +182,7 @@ void PlainSession::startWriteData()
else else
bufferSize = BUFFER_SIZE; bufferSize = BUFFER_SIZE;
DEBUG_STREAM << "PlainSession::startWriteData() buffer size " << bufferSize << endl; //DEBUG_STREAM << "PlainSession::startWriteData() buffer size " << bufferSize << endl;
std::vector<char> writeBuff; std::vector<char> writeBuff;
writeBuff.resize(bufferSize); writeBuff.resize(bufferSize);
......
...@@ -354,6 +354,12 @@ ResponseSP ProtocolManager::prepareKeepAlive(RequestSP request_sp) ...@@ -354,6 +354,12 @@ ResponseSP ProtocolManager::prepareKeepAlive(RequestSP request_sp)
response_sp->set_type(Response::KEEPALIVE); response_sp->set_type(Response::KEEPALIVE);
m_isTransferRequest = false;
m_filePath.clear();
m_fileSize = 0;
return response_sp; return response_sp;
} }
......
...@@ -198,7 +198,7 @@ void SSLSession::startWriteResponse() ...@@ -198,7 +198,7 @@ void SSLSession::startWriteResponse()
//============================================================================== //==============================================================================
void SSLSession::startWriteData() void SSLSession::startWriteData()
{ {
DEBUG_STREAM << "SSLSession::startWriteData()" << endl; //DEBUG_STREAM << "SSLSession::startWriteData()" << endl;
try try
{ {
...@@ -208,7 +208,7 @@ void SSLSession::startWriteData() ...@@ -208,7 +208,7 @@ void SSLSession::startWriteData()
{ {
int leftToRead = m_inputStreamSize - m_inputStream.tellg(); int leftToRead = m_inputStreamSize - m_inputStream.tellg();
DEBUG_STREAM << "SSLSession::startWriteData() left to read " << leftToRead << endl; //DEBUG_STREAM << "SSLSession::startWriteData() left to read " << leftToRead << endl;
int bufferSize = 0; int bufferSize = 0;
...@@ -217,7 +217,7 @@ void SSLSession::startWriteData() ...@@ -217,7 +217,7 @@ void SSLSession::startWriteData()
else else
bufferSize = BUFFER_SIZE; bufferSize = BUFFER_SIZE;
DEBUG_STREAM << "SSLSession::startWriteData() buffer size " << bufferSize << endl; //DEBUG_STREAM << "SSLSession::startWriteData() buffer size " << bufferSize << endl;
std::vector<char> writeBuff; std::vector<char> writeBuff;
writeBuff.resize(bufferSize); writeBuff.resize(bufferSize);
......
...@@ -130,7 +130,7 @@ void Session::handleWriteResponse(const boost::system::error_code& errorCode) ...@@ -130,7 +130,7 @@ void Session::handleWriteResponse(const boost::system::error_code& errorCode)
//============================================================================== //==============================================================================
void Session::handleWriteData(const boost::system::error_code& errorCode) void Session::handleWriteData(const boost::system::error_code& errorCode)
{ {
DEBUG_STREAM << "Session::handleWriteData()" << endl; //DEBUG_STREAM << "Session::handleWriteData()" << endl;
if(!errorCode) if(!errorCode)
{ {
...@@ -138,12 +138,12 @@ void Session::handleWriteData(const boost::system::error_code& errorCode) ...@@ -138,12 +138,12 @@ void Session::handleWriteData(const boost::system::error_code& errorCode)
} }
else if(errorCode == boost::asio::error::eof) else if(errorCode == boost::asio::error::eof)
{ {
DEBUG_STREAM << "Session::handleWriteResponse() end of file from " DEBUG_STREAM << "Session::handleWriteData() end of file from "
<< m_remoteEndpoint << endl; << m_remoteEndpoint << endl;
} }
else else
{ {
ERROR_STREAM << "Session::handleWriteResponse() " ERROR_STREAM << "Session::handleWriteData() "
<< errorCode.message() << " from " << m_remoteEndpoint << endl; << errorCode.message() << " from " << m_remoteEndpoint << endl;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment