Below is the list of changes that have just been committed into a local
5.1 repository of jonas. When jonas does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2008-01-23 13:05:29+01:00, jonas@stripped +1 -0
Merge perch.ndb.mysql.com:/home/jonas/src/50-telco-gca
into perch.ndb.mysql.com:/home/jonas/src/51-telco-gca
MERGE: 1.1810.2371.87
storage/ndb/src/common/transporter/TCP_Transporter.cpp@stripped, 2008-01-23 13:05:26+01:00,
jonas@stripped +0 -0
Auto merged
MERGE: 1.9.3.2
storage/ndb/src/common/transporter/TCP_Transporter.cpp@stripped, 2008-01-23
13:05:26+01:00, jonas@stripped +0 -0
Merge rename: ndb/src/common/transporter/TCP_Transporter.cpp ->
storage/ndb/src/common/transporter/TCP_Transporter.cpp
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: jonas
# Host: perch.ndb.mysql.com
# Root: /home/jonas/src/51-telco-gca/RESYNC
--- 1.9.3.1/ndb/src/common/transporter/TCP_Transporter.cpp 2008-01-23 13:05:32 +01:00
+++ 1.15/storage/ndb/src/common/transporter/TCP_Transporter.cpp 2008-01-23 13:05:32 +01:00
@@ -19,13 +19,10 @@
#include "TCP_Transporter.hpp"
#include <NdbOut.hpp>
#include <NdbSleep.h>
-// End of stuff to be moved
-#if defined NDB_OSE || defined NDB_SOFTOSE
-#define inet_send inet_send
-#else
-#define inet_send send
-#endif
+#include <EventLogger.hpp>
+extern EventLogger g_eventLogger;
+// End of stuff to be moved
#ifdef NDB_WIN32
class ndbstrerror
@@ -158,14 +155,14 @@
if (setsockopt(theSocket, SOL_SOCKET, SO_RCVBUF,
(char*)&sockOptRcvBufSize, sizeof(sockOptRcvBufSize)) < 0) {
#ifdef DEBUG_TRANSPORTER
- ndbout_c("The setsockopt SO_RCVBUF error code = %d", InetErrno);
+ g_eventLogger.error("The setsockopt SO_RCVBUF error code = %d", InetErrno);
#endif
}//if
if (setsockopt(theSocket, SOL_SOCKET, SO_SNDBUF,
(char*)&sockOptSndBufSize, sizeof(sockOptSndBufSize)) < 0) {
#ifdef DEBUG_TRANSPORTER
- ndbout_c("The setsockopt SO_SNDBUF error code = %d", InetErrno);
+ g_eventLogger.error("The setsockopt SO_SNDBUF error code = %d", InetErrno);
#endif
}//if
@@ -176,7 +173,7 @@
if (setsockopt(theSocket, IPPROTO_TCP, TCP_NODELAY,
(char*)&sockOptNodelay, sizeof(sockOptNodelay)) < 0) {
#ifdef DEBUG_TRANSPORTER
- ndbout_c("The setsockopt TCP_NODELAY error code = %d", InetErrno);
+ g_eventLogger.error("The setsockopt TCP_NODELAY error code = %d", InetErrno);
#endif
}//if
}
@@ -190,7 +187,7 @@
if(ioctlsocket(socket, FIONBIO, &ul))
{
#ifdef DEBUG_TRANSPORTER
- ndbout_c("Set non-blocking server error3: %d", InetErrno);
+ g_eventLogger.error("Set non-blocking server error3: %d", InetErrno);
#endif
}//if
return true;
@@ -204,13 +201,13 @@
flags = fcntl(socket, F_GETFL, 0);
if (flags < 0) {
#ifdef DEBUG_TRANSPORTER
- ndbout_c("Set non-blocking server error1: %s", strerror(InetErrno));
+ g_eventLogger.error("Set non-blocking server error1: %s", strerror(InetErrno));
#endif
}//if
flags |= NDB_NONBLOCK;
if (fcntl(socket, F_SETFL, flags) == -1) {
#ifdef DEBUG_TRANSPORTER
- ndbout_c("Set non-blocking server error2: %s", strerror(InetErrno));
+ g_eventLogger.error("Set non-blocking server error2: %s", strerror(InetErrno));
#endif
}//if
return true;
@@ -220,22 +217,6 @@
bool
TCP_Transporter::sendIsPossible(struct timeval * timeout) {
-#ifdef NDB_OSE
- /**
- * In OSE you cant do select without owning a socket,
- * and since this method might be called by any thread in the api
- * we choose not to implementet and always return true after sleeping
- * a while.
- *
- * Note that this only sensible as long as the sockets are non blocking
- */
- if(theSocket >= 0){
- Uint32 timeOutMillis = timeout->tv_sec * 1000 + timeout->tv_usec / 1000;
- NdbSleep_MilliSleep(timeOutMillis);
- return true;
- }
- return false;
-#else
if(theSocket != NDB_INVALID_SOCKET){
fd_set writeset;
FD_ZERO(&writeset);
@@ -249,7 +230,6 @@
return false;
}
return false;
-#endif
}
Uint32
@@ -335,7 +315,7 @@
{
const char * const sendPtr = m_sendBuffer.sendPtr;
const Uint32 sizeToSend = m_sendBuffer.sendDataSize;
- const int nBytesSent = inet_send(theSocket, sendPtr, sizeToSend, 0);
+ const int nBytesSent = send(theSocket, sendPtr, sizeToSend, 0);
if (nBytesSent > 0)
{
@@ -358,7 +338,7 @@
// Send failed
#if defined DEBUG_TRANSPORTER
- ndbout_c("Send Failure(disconnect==%d) to node = %d nBytesSent = %d "
+ g_eventLogger.error("Send Failure(disconnect==%d) to node = %d nBytesSent = %d "
"errno = %d strerror = %s",
DISCONNECT_ERRNO(InetErrno, nBytesSent),
remoteNodeId, nBytesSent, InetErrno,
@@ -393,11 +373,11 @@
if(receiveBuffer.sizeOfData > receiveBuffer.sizeOfBuffer){
#ifdef DEBUG_TRANSPORTER
- ndbout_c("receiveBuffer.sizeOfData(%d) > receiveBuffer.sizeOfBuffer(%d)",
+ g_eventLogger.error("receiveBuffer.sizeOfData(%d) > receiveBuffer.sizeOfBuffer(%d)",
receiveBuffer.sizeOfData, receiveBuffer.sizeOfBuffer);
- ndbout_c("nBytesRead = %d", nBytesRead);
+ g_eventLogger.error("nBytesRead = %d", nBytesRead);
#endif
- ndbout_c("receiveBuffer.sizeOfData(%d) > receiveBuffer.sizeOfBuffer(%d)",
+ g_eventLogger.error("receiveBuffer.sizeOfData(%d) > receiveBuffer.sizeOfBuffer(%d)",
receiveBuffer.sizeOfData, receiveBuffer.sizeOfBuffer);
report_error(TE_INVALID_MESSAGE_LENGTH);
return 0;
@@ -414,7 +394,7 @@
return nBytesRead;
} else {
#if defined DEBUG_TRANSPORTER
- ndbout_c("Receive Failure(disconnect==%d) to node = %d nBytesSent = %d "
+ g_eventLogger.error("Receive Failure(disconnect==%d) to node = %d nBytesSent = %d "
"errno = %d strerror = %s",
DISCONNECT_ERRNO(InetErrno, nBytesRead),
remoteNodeId, nBytesRead, InetErrno,
| Thread |
|---|
| • bk commit into 5.1 tree (jonas:1.2531) | jonas | 23 Jan |