Commit 7e36a0b7 authored by unknown's avatar unknown

ndb - fix 64-bit problem in autotest


ndb/test/src/CpcClient.cpp:
  Fix 64-bit problem
parent 7bb97a4a
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
0, 0, \ 0, 0, \
0, \ 0, \
(desc), \ (desc), \
(void *)(value) } (value) }
#define CPC_ARG(name, type, opt, desc) \ #define CPC_ARG(name, type, opt, desc) \
{ (name), \ { (name), \
...@@ -351,17 +351,12 @@ SimpleCpcClient::define_process(Process & p, Properties& reply){ ...@@ -351,17 +351,12 @@ SimpleCpcClient::define_process(Process & p, Properties& reply){
int int
SimpleCpcClient::list_processes(Vector<Process> &procs, Properties& reply) { SimpleCpcClient::list_processes(Vector<Process> &procs, Properties& reply) {
enum Proclist { int start, end, entry;
Proclist_Start,
Proclist_End,
Proclist_Entry
};
const ParserRow_t list_reply[] = { const ParserRow_t list_reply[] = {
CPC_CMD("start processes", Proclist_Start, ""), CPC_CMD("start processes", &start, ""),
CPC_CMD("end processes", &end, ""),
CPC_CMD("end processes", Proclist_End, ""),
CPC_CMD("process", Proclist_Entry, ""), CPC_CMD("process", &entry, ""),
CPC_ARG("id", Int, Mandatory, "Id of process."), CPC_ARG("id", Int, Mandatory, "Id of process."),
CPC_ARG("name", String, Mandatory, "Name of process"), CPC_ARG("name", String, Mandatory, "Name of process"),
CPC_ARG("group", String, Mandatory, "Group of process"), CPC_ARG("group", String, Mandatory, "Group of process"),
...@@ -390,26 +385,29 @@ SimpleCpcClient::list_processes(Vector<Process> &procs, Properties& reply) { ...@@ -390,26 +385,29 @@ SimpleCpcClient::list_processes(Vector<Process> &procs, Properties& reply) {
bool done = false; bool done = false;
while(!done) { while(!done) {
const Properties *proc; const Properties *proc;
enum Proclist p; void *p;
cpc_recv(list_reply, &proc, (void **)&p); cpc_recv(list_reply, &proc, &p);
switch(p) { if(p == &start)
case Proclist_Start: {
/* do nothing */ /* do nothing */
break; }
case Proclist_End: else if(p == &end)
{
done = true; done = true;
break; }
case Proclist_Entry: else if(p == &entry)
{
if(proc != NULL){ if(proc != NULL){
Process p; Process p;
convert(* proc, p); convert(* proc, p);
procs.push_back(p); procs.push_back(p);
} }
break; }
default: else
/* ignore */ {
break; ndbout_c("internal error: %d", __LINE__);
return -1;
} }
} }
return 0; return 0;
......
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