Commit 03a5e223 authored by unknown's avatar unknown

corrected prev patch on ndb_mgmd usage of SignalSender

parent e63bb696
...@@ -1227,9 +1227,7 @@ MgmtSrvr::setEventReportingLevelImpl(int nodeId, ...@@ -1227,9 +1227,7 @@ MgmtSrvr::setEventReportingLevelImpl(int nodeId,
EventSubscribeReq::SignalLength); EventSubscribeReq::SignalLength);
*dst = ll; *dst = ll;
if (ss.sendSignal(nodeId, &ssig) != SEND_OK) { send(ss,ssig,nodeId,NODE_TYPE_DB);
return SEND_OR_RECEIVE_FAILED;
}
#if 0 #if 0
while (1) while (1)
...@@ -1283,6 +1281,19 @@ MgmtSrvr::setNodeLogLevelImpl(int nodeId, const SetLogLevelOrd & ll) ...@@ -1283,6 +1281,19 @@ MgmtSrvr::setNodeLogLevelImpl(int nodeId, const SetLogLevelOrd & ll)
return ss.sendSignal(nodeId, &ssig) == SEND_OK ? 0 : SEND_OR_RECEIVE_FAILED; 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;
}
//**************************************************************************** //****************************************************************************
//**************************************************************************** //****************************************************************************
......
...@@ -31,6 +31,8 @@ ...@@ -31,6 +31,8 @@
#include <EventLogger.hpp> #include <EventLogger.hpp>
#include <signaldata/EventSubscribeReq.hpp> #include <signaldata/EventSubscribeReq.hpp>
#include <SignalSender.hpp>
/** /**
* @desc Block number for Management server. * @desc Block number for Management server.
* @todo This should probably be somewhere else. I don't know where atm. * @todo This should probably be somewhere else. I don't know where atm.
...@@ -496,8 +498,7 @@ public: ...@@ -496,8 +498,7 @@ public:
private: private:
//************************************************************************** //**************************************************************************
int setEventReportingLevel(int processId, LogLevel::EventCategory, Uint32); int send(SignalSender &ss, SimpleSignal &ssig, Uint32 node, Uint32 node_type);
void set_common_stop_req_params(void *stopReq);
int sendSTOP_REQ(NodeId nodeId, int sendSTOP_REQ(NodeId nodeId,
NodeBitmask &stoppedNodes, NodeBitmask &stoppedNodes,
......
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