summaryrefslogtreecommitdiff
path: root/storage/ndb/src/common/transporter
diff options
context:
space:
mode:
authorunknown <mskold/marty@mysql.com/linux.site>2006-08-30 11:41:21 +0200
committerunknown <mskold/marty@mysql.com/linux.site>2006-08-30 11:41:21 +0200
commit3dcf86736ad48960656d2f2fce9839e6ea330070 (patch)
tree84717b118a5ea841a5baefe32b6059bf0770d9eb /storage/ndb/src/common/transporter
parent524914b2170927aa0b1d95b63d229ac0e11fc092 (diff)
downloadmariadb-git-3dcf86736ad48960656d2f2fce9839e6ea330070.tar.gz
NDBAPI cleanup
Diffstat (limited to 'storage/ndb/src/common/transporter')
-rw-r--r--storage/ndb/src/common/transporter/Packer.cpp4
-rw-r--r--storage/ndb/src/common/transporter/TransporterRegistry.cpp14
2 files changed, 9 insertions, 9 deletions
diff --git a/storage/ndb/src/common/transporter/Packer.cpp b/storage/ndb/src/common/transporter/Packer.cpp
index bcfac8417bb..e9da641de75 100644
--- a/storage/ndb/src/common/transporter/Packer.cpp
+++ b/storage/ndb/src/common/transporter/Packer.cpp
@@ -213,8 +213,8 @@ TransporterRegistry::unpack(Uint32 * readPtr,
Uint32 * eodPtr,
NodeId remoteNodeId,
IOState state) {
- static SignalHeader signalHeader;
- static LinearSectionPtr ptr[3];
+ SignalHeader signalHeader;
+ LinearSectionPtr ptr[3];
Uint32 loop_count = 0;
if(state == NoHalt || state == HaltOutput){
while ((readPtr < eodPtr) && (loop_count < MAX_RECEIVED_SIGNALS)) {
diff --git a/storage/ndb/src/common/transporter/TransporterRegistry.cpp b/storage/ndb/src/common/transporter/TransporterRegistry.cpp
index 458f7c4f47e..4a0be702a86 100644
--- a/storage/ndb/src/common/transporter/TransporterRegistry.cpp
+++ b/storage/ndb/src/common/transporter/TransporterRegistry.cpp
@@ -80,14 +80,15 @@ SocketServer::Session * TransporterService::newSession(NDB_SOCKET_TYPE sockfd)
TransporterRegistry::TransporterRegistry(void * callback,
unsigned _maxTransporters,
- unsigned sizeOfLongSignalMemory)
+ unsigned sizeOfLongSignalMemory) :
+ m_mgm_handle(0),
+ m_transp_count(0)
{
DBUG_ENTER("TransporterRegistry::TransporterRegistry");
nodeIdSpecified = false;
maxTransporters = _maxTransporters;
sendCounter = 1;
- m_mgm_handle= 0;
callbackObj=callback;
@@ -1002,7 +1003,6 @@ TransporterRegistry::performReceive()
#endif
}
-static int x = 0;
void
TransporterRegistry::performSend()
{
@@ -1070,7 +1070,7 @@ TransporterRegistry::performSend()
}
#endif
#ifdef NDB_TCP_TRANSPORTER
- for (i = x; i < nTCPTransporters; i++)
+ for (i = m_transp_count; i < nTCPTransporters; i++)
{
TCP_Transporter *t = theTCPTransporters[i];
if (t && t->hasDataToSend() && t->isConnected() &&
@@ -1079,7 +1079,7 @@ TransporterRegistry::performSend()
t->doSend();
}
}
- for (i = 0; i < x && i < nTCPTransporters; i++)
+ for (i = 0; i < m_transp_count && i < nTCPTransporters; i++)
{
TCP_Transporter *t = theTCPTransporters[i];
if (t && t->hasDataToSend() && t->isConnected() &&
@@ -1088,8 +1088,8 @@ TransporterRegistry::performSend()
t->doSend();
}
}
- x++;
- if (x == nTCPTransporters) x = 0;
+ m_transp_count++;
+ if (m_transp_count == nTCPTransporters) m_transp_count = 0;
#endif
#endif
#ifdef NDB_SCI_TRANSPORTER