Commit c24523c8 authored by unknown's avatar unknown

corrected error in checking get() return value from config iterator

parent 0fbd1d8f
...@@ -2833,7 +2833,7 @@ MgmtSrvr::setConnectionDbParameter(int node1, ...@@ -2833,7 +2833,7 @@ MgmtSrvr::setConnectionDbParameter(int node1,
DBUG_RETURN(-2); DBUG_RETURN(-2);
} }
if(iter.get(param, &current_value) < 0) { if(iter.get(param, &current_value) != 0) {
msg.assign("Unable to get current value of parameter"); msg.assign("Unable to get current value of parameter");
NdbMutex_Unlock(m_configMutex); NdbMutex_Unlock(m_configMutex);
DBUG_RETURN(-3); DBUG_RETURN(-3);
...@@ -2848,7 +2848,7 @@ MgmtSrvr::setConnectionDbParameter(int node1, ...@@ -2848,7 +2848,7 @@ MgmtSrvr::setConnectionDbParameter(int node1,
DBUG_RETURN(-4); DBUG_RETURN(-4);
} }
if(iter.get(param, &new_value) < 0) { if(iter.get(param, &new_value) != 0) {
msg.assign("Unable to get parameter after setting it."); msg.assign("Unable to get parameter after setting it.");
NdbMutex_Unlock(m_configMutex); NdbMutex_Unlock(m_configMutex);
DBUG_RETURN(-5); DBUG_RETURN(-5);
...@@ -2883,7 +2883,7 @@ MgmtSrvr::getConnectionDbParameter(int node1, ...@@ -2883,7 +2883,7 @@ MgmtSrvr::getConnectionDbParameter(int node1,
} }
for(;iter.valid();iter.next()) { for(;iter.valid();iter.next()) {
Uint32 n1,n2; Uint32 n1=0,n2=0;
iter.get(CFG_CONNECTION_NODE_1, &n1); iter.get(CFG_CONNECTION_NODE_1, &n1);
iter.get(CFG_CONNECTION_NODE_2, &n2); iter.get(CFG_CONNECTION_NODE_2, &n2);
if((n1 == (unsigned)node1 && n2 == (unsigned)node2) if((n1 == (unsigned)node1 && n2 == (unsigned)node2)
...@@ -2896,7 +2896,7 @@ MgmtSrvr::getConnectionDbParameter(int node1, ...@@ -2896,7 +2896,7 @@ MgmtSrvr::getConnectionDbParameter(int node1,
DBUG_RETURN(-1); DBUG_RETURN(-1);
} }
if(iter.get(param, (Uint32*)value) < 0) { if(iter.get(param, (Uint32*)value) != 0) {
msg.assign("Unable to get current value of parameter"); msg.assign("Unable to get current value of parameter");
NdbMutex_Unlock(m_configMutex); NdbMutex_Unlock(m_configMutex);
DBUG_RETURN(-1); DBUG_RETURN(-1);
......
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