Commit 1b1ef2ea authored by unknown's avatar unknown

changed to same signature as rest of print functions

provite declarations for signal print functions, needed on some platforms
ome platforms don't like the length calculation for SignalDataPrintFunction
    so null terminate instead
ome platforms complain about this extra level Logger::Logger::
 null terminate SignalDataPrintFunctions instead
    move declaration of print function to SignalData.hpp
  just change from "" to <> in include
 moved double declatration of i out



ndb/include/kernel/signaldata/DihContinueB.hpp:
  changed to same signature as rest of print functions
ndb/include/kernel/signaldata/NdbfsContinueB.hpp:
  changed to same signature as rest of print functions
ndb/include/kernel/signaldata/SignalData.hpp:
  provite declarations for signal print functions, needed on some platforms
ndb/src/common/debugger/DebuggerNames.cpp:
  some platforms don't like the length calculation for SignalDataPrintFunction
  so null terminate instead
ndb/src/common/debugger/EventLogger.cpp:
  some platforms complain about this extra level Logger::Logger::
ndb/src/common/debugger/signaldata/ContinueB.cpp:
  changed to same signature as rest of print functions
ndb/src/common/debugger/signaldata/DihContinueB.cpp:
  changed to same signature as rest of print functions
ndb/src/common/debugger/signaldata/NdbfsContinueB.cpp:
  changed to same signature as rest of print functions
ndb/src/common/debugger/signaldata/SignalDataPrint.cpp:
  null terminate SignalDataPrintFunctions instead
  move declaration of print function to SignalData.hpp
ndb/src/common/portlib/NdbSleep.c:
  just change from "" to <> in include
ndb/src/mgmsrv/Services.cpp:
  moved double declatration of i out
parent ffd77c46
......@@ -24,7 +24,8 @@ class DihContinueB {
* Sender(s)/Reciver(s)
*/
friend class Dbdih;
friend bool printCONTINUEB_DBDIH(FILE * output, const Uint32 * theData, Uint32 len);
friend bool printCONTINUEB_DBDIH(FILE * output, const Uint32 * theData,
Uint32 len, Uint16);
private:
enum Type {
ZPACK_TABLE_INTO_PAGES = 1,
......
......@@ -24,7 +24,8 @@ class NdbfsContinueB {
* Sender(s)/Reciver(s)
*/
friend class Ndbfs;
friend bool printCONTINUEB_NDBFS(FILE * output, const Uint32 * theData, Uint32 len);
friend bool printCONTINUEB_NDBFS(FILE * output, const Uint32 * theData,
Uint32 len, Uint16);
private:
enum {
ZSCAN_MEMORYCHANNEL_10MS_DELAY = 0,
......
......@@ -50,4 +50,169 @@
Uint32 getTCErrorCode() { return TCErrorCode; }; \
void setTCErrorCode(Uint32 _s) { TCErrorCode = _s; };
#define GSN_PRINT_SIGNATURE(f) bool f(FILE *, const Uint32 *, Uint32, Uint16)
GSN_PRINT_SIGNATURE(printTCKEYREQ);
GSN_PRINT_SIGNATURE(printTCKEYCONF);
GSN_PRINT_SIGNATURE(printTCKEYREF);
GSN_PRINT_SIGNATURE(printLQHKEYREQ);
GSN_PRINT_SIGNATURE(printLQHKEYCONF);
GSN_PRINT_SIGNATURE(printLQHKEYREF);
GSN_PRINT_SIGNATURE(printTUPKEYREQ);
GSN_PRINT_SIGNATURE(printTUPKEYCONF);
GSN_PRINT_SIGNATURE(printTUPKEYREF);
GSN_PRINT_SIGNATURE(printTUPCOMMITREQ);
GSN_PRINT_SIGNATURE(printCONTINUEB);
GSN_PRINT_SIGNATURE(printFSOPENREQ);
GSN_PRINT_SIGNATURE(printFSCLOSEREQ);
GSN_PRINT_SIGNATURE(printFSREADWRITEREQ);
GSN_PRINT_SIGNATURE(printFSREADWRITEREQ);
GSN_PRINT_SIGNATURE(printFSREF);
GSN_PRINT_SIGNATURE(printFSREF);
GSN_PRINT_SIGNATURE(printFSREF);
GSN_PRINT_SIGNATURE(printFSREF);
GSN_PRINT_SIGNATURE(printFSREF);
GSN_PRINT_SIGNATURE(printFSCONF);
GSN_PRINT_SIGNATURE(printFSCONF);
GSN_PRINT_SIGNATURE(printFSCONF);
GSN_PRINT_SIGNATURE(printFSCONF);
GSN_PRINT_SIGNATURE(printFSCONF);
GSN_PRINT_SIGNATURE(printCLOSECOMREQCONF);
GSN_PRINT_SIGNATURE(printCLOSECOMREQCONF);
GSN_PRINT_SIGNATURE(printPACKED_SIGNAL);
GSN_PRINT_SIGNATURE(printPREPFAILREQREF);
GSN_PRINT_SIGNATURE(printPREPFAILREQREF);
GSN_PRINT_SIGNATURE(printALTER_TABLE_REQ);
GSN_PRINT_SIGNATURE(printALTER_TABLE_CONF);
GSN_PRINT_SIGNATURE(printALTER_TABLE_REF);
GSN_PRINT_SIGNATURE(printALTER_TAB_REQ);
GSN_PRINT_SIGNATURE(printALTER_TAB_CONF);
GSN_PRINT_SIGNATURE(printALTER_TAB_REF);
GSN_PRINT_SIGNATURE(printCREATE_TRIG_REQ);
GSN_PRINT_SIGNATURE(printCREATE_TRIG_CONF);
GSN_PRINT_SIGNATURE(printCREATE_TRIG_REF);
GSN_PRINT_SIGNATURE(printALTER_TRIG_REQ);
GSN_PRINT_SIGNATURE(printALTER_TRIG_CONF);
GSN_PRINT_SIGNATURE(printALTER_TRIG_REF);
GSN_PRINT_SIGNATURE(printDROP_TRIG_REQ);
GSN_PRINT_SIGNATURE(printDROP_TRIG_CONF);
GSN_PRINT_SIGNATURE(printDROP_TRIG_REF);
GSN_PRINT_SIGNATURE(printFIRE_TRIG_ORD);
GSN_PRINT_SIGNATURE(printTRIG_ATTRINFO);
GSN_PRINT_SIGNATURE(printCREATE_INDX_REQ);
GSN_PRINT_SIGNATURE(printCREATE_INDX_CONF);
GSN_PRINT_SIGNATURE(printCREATE_INDX_REF);
GSN_PRINT_SIGNATURE(printDROP_INDX_REQ);
GSN_PRINT_SIGNATURE(printDROP_INDX_CONF);
GSN_PRINT_SIGNATURE(printDROP_INDX_REF);
GSN_PRINT_SIGNATURE(printALTER_INDX_REQ);
GSN_PRINT_SIGNATURE(printALTER_INDX_CONF);
GSN_PRINT_SIGNATURE(printALTER_INDX_REF);
GSN_PRINT_SIGNATURE(printTCINDXREQ);
GSN_PRINT_SIGNATURE(printTCINDXCONF);
GSN_PRINT_SIGNATURE(printTCINDXREF);
GSN_PRINT_SIGNATURE(printINDXKEYINFO);
GSN_PRINT_SIGNATURE(printINDXATTRINFO);
GSN_PRINT_SIGNATURE(printFSAPPENDREQ);
GSN_PRINT_SIGNATURE(printBACKUP_REQ);
GSN_PRINT_SIGNATURE(printBACKUP_DATA);
GSN_PRINT_SIGNATURE(printBACKUP_REF);
GSN_PRINT_SIGNATURE(printBACKUP_CONF);
GSN_PRINT_SIGNATURE(printABORT_BACKUP_ORD);
GSN_PRINT_SIGNATURE(printBACKUP_ABORT_REP);
GSN_PRINT_SIGNATURE(printBACKUP_COMPLETE_REP);
GSN_PRINT_SIGNATURE(printBACKUP_NF_COMPLETE_REP);
GSN_PRINT_SIGNATURE(printDEFINE_BACKUP_REQ);
GSN_PRINT_SIGNATURE(printDEFINE_BACKUP_REF);
GSN_PRINT_SIGNATURE(printDEFINE_BACKUP_CONF);
GSN_PRINT_SIGNATURE(printSTART_BACKUP_REQ);
GSN_PRINT_SIGNATURE(printSTART_BACKUP_REF);
GSN_PRINT_SIGNATURE(printSTART_BACKUP_CONF);
GSN_PRINT_SIGNATURE(printBACKUP_FRAGMENT_REQ);
GSN_PRINT_SIGNATURE(printBACKUP_FRAGMENT_REF);
GSN_PRINT_SIGNATURE(printBACKUP_FRAGMENT_CONF);
GSN_PRINT_SIGNATURE(printSTOP_BACKUP_REQ);
GSN_PRINT_SIGNATURE(printSTOP_BACKUP_REF);
GSN_PRINT_SIGNATURE(printSTOP_BACKUP_CONF);
GSN_PRINT_SIGNATURE(printBACKUP_STATUS_REQ);
GSN_PRINT_SIGNATURE(printBACKUP_STATUS_CONF);
GSN_PRINT_SIGNATURE(printUTIL_SEQUENCE_REQ);
GSN_PRINT_SIGNATURE(printUTIL_SEQUENCE_REF);
GSN_PRINT_SIGNATURE(printUTIL_SEQUENCE_CONF);
GSN_PRINT_SIGNATURE(printUTIL_PREPARE_REQ);
GSN_PRINT_SIGNATURE(printUTIL_PREPARE_REF);
GSN_PRINT_SIGNATURE(printUTIL_PREPARE_CONF);
GSN_PRINT_SIGNATURE(printUTIL_EXECUTE_REQ);
GSN_PRINT_SIGNATURE(printUTIL_EXECUTE_REF);
GSN_PRINT_SIGNATURE(printUTIL_EXECUTE_CONF);
GSN_PRINT_SIGNATURE(printSCANTABREQ);
GSN_PRINT_SIGNATURE(printSCANTABCONF);
GSN_PRINT_SIGNATURE(printSCANTABREF);
GSN_PRINT_SIGNATURE(printSCANNEXTREQ);
GSN_PRINT_SIGNATURE(printLQH_FRAG_REQ);
GSN_PRINT_SIGNATURE(printLQH_FRAG_REF);
GSN_PRINT_SIGNATURE(printLQH_FRAG_CONF);
GSN_PRINT_SIGNATURE(printPREP_DROP_TAB_REQ);
GSN_PRINT_SIGNATURE(printPREP_DROP_TAB_REF);
GSN_PRINT_SIGNATURE(printPREP_DROP_TAB_CONF);
GSN_PRINT_SIGNATURE(printDROP_TAB_REQ);
GSN_PRINT_SIGNATURE(printDROP_TAB_REF);
GSN_PRINT_SIGNATURE(printDROP_TAB_CONF);
GSN_PRINT_SIGNATURE(printLCP_FRAG_ORD);
GSN_PRINT_SIGNATURE(printLCP_FRAG_REP);
GSN_PRINT_SIGNATURE(printLCP_COMPLETE_REP);
GSN_PRINT_SIGNATURE(printSTART_LCP_REQ);
GSN_PRINT_SIGNATURE(printSTART_LCP_CONF);
GSN_PRINT_SIGNATURE(printMASTER_LCP_REQ);
GSN_PRINT_SIGNATURE(printMASTER_LCP_REF);
GSN_PRINT_SIGNATURE(printMASTER_LCP_CONF);
GSN_PRINT_SIGNATURE(printCOPY_GCI_REQ);
GSN_PRINT_SIGNATURE(printSYSTEM_ERROR);
GSN_PRINT_SIGNATURE(printSTART_REC_REQ);
GSN_PRINT_SIGNATURE(printSTART_REC_CONF);
GSN_PRINT_SIGNATURE(printNF_COMPLETE_REP);
GSN_PRINT_SIGNATURE(printSIGNAL_DROPPED_REP);
GSN_PRINT_SIGNATURE(printFAIL_REP);
GSN_PRINT_SIGNATURE(printDISCONNECT_REP);
GSN_PRINT_SIGNATURE(printSUB_CREATE_REQ);
GSN_PRINT_SIGNATURE(printSUB_CREATE_CONF);
GSN_PRINT_SIGNATURE(printSUB_START_REQ);
GSN_PRINT_SIGNATURE(printSUB_START_REF);
GSN_PRINT_SIGNATURE(printSUB_START_CONF);
GSN_PRINT_SIGNATURE(printSUB_SYNC_REQ);
GSN_PRINT_SIGNATURE(printSUB_SYNC_REF);
GSN_PRINT_SIGNATURE(printSUB_SYNC_CONF);
GSN_PRINT_SIGNATURE(printSUB_META_DATA);
GSN_PRINT_SIGNATURE(printSUB_TABLE_DATA);
GSN_PRINT_SIGNATURE(printSUB_SYNC_CONTINUE_REQ);
GSN_PRINT_SIGNATURE(printSUB_SYNC_CONTINUE_REF);
GSN_PRINT_SIGNATURE(printSUB_SYNC_CONTINUE_CONF);
GSN_PRINT_SIGNATURE(printSUB_GCP_COMPLETE_REP);
GSN_PRINT_SIGNATURE(printCREATE_FRAGMENTATION_REQ);
GSN_PRINT_SIGNATURE(printCREATE_FRAGMENTATION_REF);
GSN_PRINT_SIGNATURE(printCREATE_FRAGMENTATION_CONF);
GSN_PRINT_SIGNATURE(printUTIL_CREATE_LOCK_REQ);
GSN_PRINT_SIGNATURE(printUTIL_CREATE_LOCK_REF);
GSN_PRINT_SIGNATURE(printUTIL_CREATE_LOCK_CONF);
GSN_PRINT_SIGNATURE(printUTIL_DESTROY_LOCK_REQ);
GSN_PRINT_SIGNATURE(printUTIL_DESTROY_LOCK_REF);
GSN_PRINT_SIGNATURE(printUTIL_DESTROY_LOCK_CONF);
GSN_PRINT_SIGNATURE(printUTIL_LOCK_REQ);
GSN_PRINT_SIGNATURE(printUTIL_LOCK_REF);
GSN_PRINT_SIGNATURE(printUTIL_LOCK_CONF);
GSN_PRINT_SIGNATURE(printUTIL_UNLOCK_REQ);
GSN_PRINT_SIGNATURE(printUTIL_UNLOCK_REF);
GSN_PRINT_SIGNATURE(printUTIL_UNLOCK_CONF);
GSN_PRINT_SIGNATURE(printCNTR_START_REQ);
GSN_PRINT_SIGNATURE(printCNTR_START_REF);
GSN_PRINT_SIGNATURE(printCNTR_START_CONF);
GSN_PRINT_SIGNATURE(printREAD_NODES_CONF);
GSN_PRINT_SIGNATURE(printTUX_MAINT_REQ);
GSN_PRINT_SIGNATURE(printACC_LOCKREQ);
GSN_PRINT_SIGNATURE(printLQH_TRANSCONF);
GSN_PRINT_SIGNATURE(printSCAN_FRAGREQ);
GSN_PRINT_SIGNATURE(printCONTINUEB_NDBFS);
GSN_PRINT_SIGNATURE(printCONTINUEB_DBDIH);
#endif
......@@ -53,14 +53,13 @@ initSignalNames(const char * dst[], const GsnName src[], unsigned short len){
static
int
initSignalPrinters(SignalDataPrintFunction dst[],
const NameFunctionPair src[],
unsigned short len){
const NameFunctionPair src[]){
unsigned i;
for(i = 0; i<=MAX_GSN; i++)
dst[i] = 0;
for(i = 0; i<len; i++){
unsigned short gsn = src[i].gsn;
unsigned short gsn;
for(i = 0; (gsn = src[i].gsn) > 0; i++){
SignalDataPrintFunction fun = src[i].function;
if(dst[gsn] != 0 && fun != 0){
......@@ -107,8 +106,7 @@ xxx_DUMMY_SIGNAL_NAMES_xxx = initSignalNames(localSignalNames,
NO_OF_SIGNAL_NAMES);
static const int
xxx_DUMMY_PRINT_FUNCTIONS_xxx = initSignalPrinters(localPrintFunctions,
SignalDataPrintFunctions,
NO_OF_PRINT_FUNCTIONS);
SignalDataPrintFunctions);
static const int
xxx_DUMMY_BLOCK_NAMES_xxx = initBlockNames(localBlockNames,
......
......@@ -1306,7 +1306,7 @@ EventLogger::getText(char * m_text, size_t m_text_len,
EventLogger::EventLogger() : m_filterLevel(15)
{
setCategory("EventLogger");
enable(Logger::Logger::LL_INFO, Logger::Logger::LL_ALERT);
enable(Logger::LL_INFO, Logger::LL_ALERT);
}
EventLogger::~EventLogger()
......
......@@ -24,9 +24,9 @@ bool
printCONTINUEB(FILE * output, const Uint32 * theData, Uint32 len,
Uint16 receiverBlockNo){
if(receiverBlockNo == DBDIH){
return printCONTINUEB_DBDIH(output, theData, len);
return printCONTINUEB_DBDIH(output, theData, len, 0);
} else if(receiverBlockNo == NDBFS) {
return printCONTINUEB_NDBFS(output, theData, len);
return printCONTINUEB_NDBFS(output, theData, len, 0);
}
return false;
......
......@@ -18,7 +18,10 @@
#include <signaldata/DihContinueB.hpp>
bool
printCONTINUEB_DBDIH(FILE * output, const Uint32 * theData, Uint32 len){
printCONTINUEB_DBDIH(FILE * output, const Uint32 * theData,
Uint32 len, Uint16 not_used){
(void)not_used;
switch (theData[0]) {
case DihContinueB::ZPACK_TABLE_INTO_PAGES:
......
......@@ -18,7 +18,10 @@
#include <signaldata/NdbfsContinueB.hpp>
bool
printCONTINUEB_NDBFS(FILE * output, const Uint32 * theData, Uint32 len){
printCONTINUEB_NDBFS(FILE * output, const Uint32 * theData,
Uint32 len, Uint16 not_used){
(void)not_used;
switch (theData[0]) {
case NdbfsContinueB::ZSCAN_MEMORYCHANNEL_10MS_DELAY:
......
......@@ -76,12 +76,11 @@
#include <signaldata/TuxMaint.hpp>
#include <signaldata/AccLock.hpp>
bool printCONTINUEB(FILE *, const Uint32 *, Uint32, Uint16);
/**
* This is the register
*/
const NameFunctionPair
const NameFunctionPair
SignalDataPrintFunctions[] = {
{ GSN_TCKEYREQ, printTCKEYREQ },
{ GSN_TCKEYCONF, printTCKEYCONF },
......@@ -252,10 +251,9 @@ SignalDataPrintFunctions[] = {
,{ GSN_ACC_LOCKREQ, printACC_LOCKREQ }
,{ GSN_LQH_TRANSCONF, printLQH_TRANSCONF }
,{ GSN_SCAN_FRAGREQ, printSCAN_FRAGREQ }
,{ 0, 0 }
};
const unsigned short NO_OF_PRINT_FUNCTIONS = sizeof(SignalDataPrintFunctions)/sizeof(NameFunctionPair);
template class Bitmask<1>;
template class Bitmask<2>;
template class Bitmask<4>;
......
......@@ -16,7 +16,7 @@
#include <ndb_global.h>
#include "NdbSleep.h"
#include <NdbSleep.h>
int
NdbSleep_MilliSleep(int milliseconds){
......
......@@ -1008,8 +1008,9 @@ MgmApiSession::stop(Parser<MgmApiSession>::Context &,
}
int stop_self= 0;
size_t i;
for(size_t i=0; i < nodes.size(); i++) {
for(i=0; i < nodes.size(); i++) {
if (nodes[i] == m_mgmsrv.getOwnNodeId()) {
stop_self= 1;
if (i != nodes.size()-1) {
......@@ -1023,7 +1024,7 @@ MgmApiSession::stop(Parser<MgmApiSession>::Context &,
int stopped = 0, result = 0;
for(size_t i=0; i < nodes.size(); i++)
for(i=0; i < nodes.size(); i++)
if (nodes[i] != m_mgmsrv.getOwnNodeId()) {
if((result = m_mgmsrv.stopNode(nodes[i], abort != 0)) == 0)
stopped++;
......
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