diff options
author | unknown <tomas@poseidon.ndb.mysql.com> | 2005-09-13 00:22:06 +0200 |
---|---|---|
committer | unknown <tomas@poseidon.ndb.mysql.com> | 2005-09-13 00:22:06 +0200 |
commit | 03a5e223affe9b3cb475657e2d76c15a76b00cf6 (patch) | |
tree | 7c3d423c5229c83e4363c01f7e106656d7cb04fe /ndb/src/mgmsrv | |
parent | e63bb696509aedaa8d4841771c677c8694d75cc2 (diff) | |
download | mariadb-git-03a5e223affe9b3cb475657e2d76c15a76b00cf6.tar.gz |
corrected prev patch on ndb_mgmd usage of SignalSender
Diffstat (limited to 'ndb/src/mgmsrv')
-rw-r--r-- | ndb/src/mgmsrv/MgmtSrvr.cpp | 17 | ||||
-rw-r--r-- | ndb/src/mgmsrv/MgmtSrvr.hpp | 5 |
2 files changed, 17 insertions, 5 deletions
diff --git a/ndb/src/mgmsrv/MgmtSrvr.cpp b/ndb/src/mgmsrv/MgmtSrvr.cpp index 9c81dfd9445..e00140dbdb2 100644 --- a/ndb/src/mgmsrv/MgmtSrvr.cpp +++ b/ndb/src/mgmsrv/MgmtSrvr.cpp @@ -1227,9 +1227,7 @@ MgmtSrvr::setEventReportingLevelImpl(int nodeId, EventSubscribeReq::SignalLength); *dst = ll; - if (ss.sendSignal(nodeId, &ssig) != SEND_OK) { - return SEND_OR_RECEIVE_FAILED; - } + send(ss,ssig,nodeId,NODE_TYPE_DB); #if 0 while (1) @@ -1283,6 +1281,19 @@ MgmtSrvr::setNodeLogLevelImpl(int nodeId, const SetLogLevelOrd & ll) return ss.sendSignal(nodeId, &ssig) == SEND_OK ? 0 : SEND_OR_RECEIVE_FAILED; } +int +MgmtSrvr::send(SignalSender &ss, SimpleSignal &ssig, Uint32 node, Uint32 node_type){ + Uint32 max = (node == 0) ? MAX_NODES : node + 1; + + for(; node < max; node++){ + while(nodeTypes[node] != (int)node_type && node < max) node++; + if(nodeTypes[node] != (int)node_type) + break; + ss.sendSignal(node, &ssig); + } + return 0; +} + //**************************************************************************** //**************************************************************************** diff --git a/ndb/src/mgmsrv/MgmtSrvr.hpp b/ndb/src/mgmsrv/MgmtSrvr.hpp index 0ed8a816e0d..5a29d820d6e 100644 --- a/ndb/src/mgmsrv/MgmtSrvr.hpp +++ b/ndb/src/mgmsrv/MgmtSrvr.hpp @@ -31,6 +31,8 @@ #include <EventLogger.hpp> #include <signaldata/EventSubscribeReq.hpp> +#include <SignalSender.hpp> + /** * @desc Block number for Management server. * @todo This should probably be somewhere else. I don't know where atm. @@ -496,8 +498,7 @@ public: private: //************************************************************************** - int setEventReportingLevel(int processId, LogLevel::EventCategory, Uint32); - void set_common_stop_req_params(void *stopReq); + int send(SignalSender &ss, SimpleSignal &ssig, Uint32 node, Uint32 node_type); int sendSTOP_REQ(NodeId nodeId, NodeBitmask &stoppedNodes, |