int destnode, struct timeval timeout,
const char **reclock_file);
-int ctdb_ctrl_set_reclock_file(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
- struct ctdb_client_context *client,
- int destnode, struct timeval timeout,
- const char *reclock_file);
-
int ctdb_ctrl_stop_node(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
struct ctdb_client_context *client,
int destnode, struct timeval timeout);
return 0;
}
-int ctdb_ctrl_set_reclock_file(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
- struct ctdb_client_context *client,
- int destnode, struct timeval timeout,
- const char *reclock_file)
-{
- struct ctdb_req_control request;
- struct ctdb_reply_control *reply;
- int ret;
-
- ctdb_req_control_set_reclock_file(&request, reclock_file);
- ret = ctdb_client_control(mem_ctx, ev, client, destnode, timeout,
- &request, &reply);
- if (ret != 0) {
- DEBUG(DEBUG_ERR,
- ("Control SET_RECLOCK_FILE failed to node %u, ret=%d\n",
- destnode, ret));
- return ret;
- }
-
- ret = ctdb_reply_control_set_reclock_file(reply);
- if (ret != 0) {
- DEBUG(DEBUG_ERR,
- ("Control SET_RECLOCK_FILE failed, ret=%d\n", ret));
- return ret;
- }
-
- return 0;
-}
-
int ctdb_ctrl_stop_node(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
struct ctdb_client_context *client,
int destnode, struct timeval timeout)
return 0;
}
-/*
- set the reclock filename for a node
- */
-int ctdb_ctrl_setreclock(struct ctdb_context *ctdb, struct timeval timeout, uint32_t destnode, const char *reclock)
-{
- int ret;
- TDB_DATA data;
- int32_t res;
-
- if (reclock == NULL) {
- data.dsize = 0;
- data.dptr = NULL;
- } else {
- data.dsize = strlen(reclock) + 1;
- data.dptr = discard_const(reclock);
- }
-
- ret = ctdb_control(ctdb, destnode, 0,
- CTDB_CONTROL_SET_RECLOCK_FILE, 0, data,
- NULL, NULL, &res, &timeout, NULL);
- if (ret != 0 || res != 0) {
- DEBUG(DEBUG_ERR,(__location__ " ctdb_control for setreclock failed\n"));
- return -1;
- }
-
- return 0;
-}
-
/*
stop a node
*/
int ctdb_ctrl_getreclock(struct ctdb_context *ctdb,
struct timeval timeout, uint32_t destnode,
TALLOC_CTX *mem_ctx, const char **reclock);
-int ctdb_ctrl_setreclock(struct ctdb_context *ctdb,
- struct timeval timeout, uint32_t destnode,
- const char *reclock);
int ctdb_ctrl_stop_node(struct ctdb_context *ctdb, struct timeval timeout,
uint32_t destnode);