This is no longer used.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
struct ctdb_client_context *client,
int destnode, struct timeval timeout);
-int ctdb_ctrl_set_natgwstate(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
- struct ctdb_client_context *client,
- int destnode, struct timeval timeout,
- uint32_t natgw_role);
-
int ctdb_ctrl_set_lmasterrole(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
struct ctdb_client_context *client,
int destnode, struct timeval timeout,
return 0;
}
-int ctdb_ctrl_set_natgwstate(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
- struct ctdb_client_context *client,
- int destnode, struct timeval timeout,
- uint32_t natgw_role)
-{
- struct ctdb_req_control request;
- struct ctdb_reply_control *reply;
- int ret;
-
- ctdb_req_control_set_natgwstate(&request, natgw_role);
- ret = ctdb_client_control(mem_ctx, ev, client, destnode, timeout,
- &request, &reply);
- if (ret != 0) {
- DEBUG(DEBUG_ERR,
- ("Control SET_NATGWSTATE failed to node %u, ret=%d\n",
- destnode, ret));
- return ret;
- }
-
- ret = ctdb_reply_control_set_natgwstate(reply);
- if (ret != 0) {
- DEBUG(DEBUG_ERR,
- ("Control SET_NATGWSTATE failed, ret=%d\n", ret));
- return ret;
- }
-
- return 0;
-}
-
int ctdb_ctrl_set_lmasterrole(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
struct ctdb_client_context *client,
int destnode, struct timeval timeout,
return 0;
}
-/*
- set the natgw state for a node
- */
-int ctdb_ctrl_setnatgwstate(struct ctdb_context *ctdb, struct timeval timeout, uint32_t destnode, uint32_t natgwstate)
-{
- int ret;
- TDB_DATA data;
- int32_t res;
-
- data.dsize = sizeof(natgwstate);
- data.dptr = (uint8_t *)&natgwstate;
-
- ret = ctdb_control(ctdb, destnode, 0,
- CTDB_CONTROL_SET_NATGWSTATE, 0, data,
- NULL, NULL, &res, &timeout, NULL);
- if (ret != 0 || res != 0) {
- DEBUG(DEBUG_ERR,(__location__ " ctdb_control for setnatgwstate failed\n"));
- return -1;
- }
-
- return 0;
-}
-
/*
set the lmaster role for a node
*/
int ctdb_ctrl_continue_node(struct ctdb_context *ctdb, struct timeval timeout,
uint32_t destnode);
-int ctdb_ctrl_setnatgwstate(struct ctdb_context *ctdb,
- struct timeval timeout, uint32_t destnode,
- uint32_t natgwstate);
int ctdb_ctrl_setlmasterrole(struct ctdb_context *ctdb,
struct timeval timeout, uint32_t destnode,
uint32_t lmasterrole);