Commit e2ba0ab9 authored by unknown's avatar unknown

Merge perch.ndb.mysql.com:/home/jonas/src/50-telco-gca

into  perch.ndb.mysql.com:/home/jonas/src/51-telco-gca


storage/ndb/src/common/transporter/TCP_Transporter.cpp:
  Auto merged
parents 71377f41 ac632f5c
...@@ -310,22 +310,32 @@ TCP_Transporter::doSend() { ...@@ -310,22 +310,32 @@ TCP_Transporter::doSend() {
// Empty the SendBuffers // Empty the SendBuffers
bool sent_any = true;
while (m_sendBuffer.dataSize > 0)
{
const char * const sendPtr = m_sendBuffer.sendPtr; const char * const sendPtr = m_sendBuffer.sendPtr;
const Uint32 sizeToSend = m_sendBuffer.sendDataSize; const Uint32 sizeToSend = m_sendBuffer.sendDataSize;
if (sizeToSend > 0){
const int nBytesSent = send(theSocket, sendPtr, sizeToSend, 0); const int nBytesSent = send(theSocket, sendPtr, sizeToSend, 0);
if (nBytesSent > 0) { if (nBytesSent > 0)
{
sent_any = true;
m_sendBuffer.bytesSent(nBytesSent); m_sendBuffer.bytesSent(nBytesSent);
sendCount ++; sendCount ++;
sendSize += nBytesSent; sendSize += nBytesSent;
if(sendCount == reportFreq){ if(sendCount == reportFreq)
{
reportSendLen(get_callback_obj(), remoteNodeId, sendCount, sendSize); reportSendLen(get_callback_obj(), remoteNodeId, sendCount, sendSize);
sendCount = 0; sendCount = 0;
sendSize = 0; sendSize = 0;
} }
} else { }
else
{
if (nBytesSent < 0 && InetErrno == EAGAIN && sent_any)
break;
// Send failed // Send failed
#if defined DEBUG_TRANSPORTER #if defined DEBUG_TRANSPORTER
g_eventLogger.error("Send Failure(disconnect==%d) to node = %d nBytesSent = %d " g_eventLogger.error("Send Failure(disconnect==%d) to node = %d nBytesSent = %d "
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment