along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#include "includes.h"
-#include "../include/ctdb_private.h"
-#include "../common/rb_tree.h"
+#include "include/ctdb_protocol.h"
+#include "include/ctdb_private.h"
+#include "common/rb_tree.h"
#define SERVER_ID_KEY_SIZE 3
static uint32_t key[SERVER_ID_KEY_SIZE];
key[0] = server_id->type;
- key[1] = server_id->vnn;
+ key[1] = server_id->pnn;
key[2] = server_id->server_id;
return &key[0];
if (client == NULL) {
- DEBUG(0,(__location__ " Could not find client parent structure. You can not send this control to a remote node\n"));
+ DEBUG(DEBUG_ERR,(__location__ " Could not find client parent structure. You can not send this control to a remote node\n"));
return 1;
}
{
struct ctdb_server_id *server_id = (struct ctdb_server_id *)indata.dptr;
- return (int32_t)trbt_lookuparray32(ctdb->server_ids,
- SERVER_ID_KEY_SIZE,
- get_server_id_key(server_id));
+ return trbt_lookuparray32(ctdb->server_ids,
+ SERVER_ID_KEY_SIZE,
+ get_server_id_key(server_id)) == NULL? 0 : 1;
}
/*
struct count_server_ids);
if (svid == NULL) {
- DEBUG(0, (__location__ " Got null pointer for svid\n"));
+ DEBUG(DEBUG_ERR, (__location__ " Got null pointer for svid\n"));
return;
}
struct ctdb_server_id);
if (svid == NULL) {
- DEBUG(0, (__location__ " Got null pointer for svid\n"));
+ DEBUG(DEBUG_ERR, (__location__ " Got null pointer for svid\n"));
return;
}
if (svid->count >= svid->list->num) {
- DEBUG(0, (__location__ " size of server id tree changed during traverse\n"));
+ DEBUG(DEBUG_ERR, (__location__ " size of server id tree changed during traverse\n"));
return;
}