int destnode, struct timeval timeout,
struct ctdb_addr_info *addr_info);
-int ctdb_ctrl_transaction_start(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
- struct ctdb_client_context *client,
- int destnode, struct timeval timeout,
- uint32_t tid);
-
-int ctdb_ctrl_transaction_commit(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev,
- struct ctdb_client_context *client,
- int destnode, struct timeval timeout,
- uint32_t tid);
-
int ctdb_ctrl_wipe_database(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
struct ctdb_client_context *client,
int destnode, struct timeval timeout,
int destnode, struct timeval timeout,
struct ctdb_ban_state **ban_state);
-int ctdb_ctrl_transaction_cancel(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev,
- struct ctdb_client_context *client,
- int destnode, struct timeval timeout,
- uint32_t tid);
-
int ctdb_ctrl_register_notify(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
struct ctdb_client_context *client,
int destnode, struct timeval timeout,
return 0;
}
-int ctdb_ctrl_transaction_start(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev,
- struct ctdb_client_context *client,
- int destnode, struct timeval timeout,
- uint32_t tid)
-{
- struct ctdb_req_control request;
- struct ctdb_reply_control *reply;
- int ret;
-
- ctdb_req_control_transaction_start(&request, tid);
- ret = ctdb_client_control(mem_ctx, ev, client, destnode, timeout,
- &request, &reply);
- if (ret != 0) {
- DEBUG(DEBUG_ERR,
- ("Control TRANSACTION_START failed to node %u, ret=%d\n",
- destnode, ret));
- return ret;
- }
-
- ret = ctdb_reply_control_transaction_start(reply);
- if (ret != 0) {
- DEBUG(DEBUG_ERR,
- ("Control TRANSACTION_START failed, ret=%d\n", ret));
- return ret;
- }
-
- return 0;
-}
-
-int ctdb_ctrl_transaction_commit(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev,
- struct ctdb_client_context *client,
- int destnode, struct timeval timeout,
- uint32_t tid)
-{
- struct ctdb_req_control request;
- struct ctdb_reply_control *reply;
- int ret;
-
- ctdb_req_control_transaction_commit(&request, tid);
- ret = ctdb_client_control(mem_ctx, ev, client, destnode, timeout,
- &request, &reply);
- if (ret != 0) {
- DEBUG(DEBUG_ERR,
- ("Control TRANSACTION_COMMIT failed to node %u, ret=%d\n",
- destnode, ret));
- return ret;
- }
-
- ret = ctdb_reply_control_transaction_commit(reply);
- if (ret != 0) {
- DEBUG(DEBUG_ERR,
- ("Control TRANSACTION_COMMIT failed, ret=%d\n", ret));
- return ret;
- }
-
- return 0;
-}
-
int ctdb_ctrl_wipe_database(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
struct ctdb_client_context *client,
int destnode, struct timeval timeout,
return 0;
}
-int ctdb_ctrl_transaction_cancel(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
- struct ctdb_client_context *client,
- int destnode, struct timeval timeout,
- uint32_t tid)
-{
- struct ctdb_req_control request;
- struct ctdb_reply_control *reply;
- int ret;
-
- ctdb_req_control_transaction_cancel(&request, tid);
- ret = ctdb_client_control(mem_ctx, ev, client, destnode, timeout,
- &request, &reply);
- if (ret != 0) {
- DEBUG(DEBUG_ERR,
- ("Control TRANSACTION_CANCEL failed to node %u, ret=%d\n",
- destnode, ret));
- return ret;
- }
-
- ret = ctdb_reply_control_transaction_cancel(reply);
- if (ret != 0) {
- DEBUG(DEBUG_ERR,
- ("Control TRANSACTION_CANCEL failed, ret=%d\n", ret));
- return ret;
- }
-
- return 0;
-}
-
int ctdb_ctrl_register_notify(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
struct ctdb_client_context *client,
int destnode, struct timeval timeout,