diff options
-rw-r--r-- | ctdb/client/client_control_sync.c | 29 | ||||
-rw-r--r-- | ctdb/client/client_sync.h | 5 |
2 files changed, 34 insertions, 0 deletions
diff --git a/ctdb/client/client_control_sync.c b/ctdb/client/client_control_sync.c index 343d15dfd66..7ee9f1da4a0 100644 --- a/ctdb/client/client_control_sync.c +++ b/ctdb/client/client_control_sync.c @@ -2631,3 +2631,32 @@ int ctdb_ctrl_db_attach_replicated(TALLOC_CTX *mem_ctx, return 0; } + +int ctdb_ctrl_check_pid_srvid(TALLOC_CTX *mem_ctx, struct tevent_context *ev, + struct ctdb_client_context *client, + int destnode, struct timeval timeout, + struct ctdb_pid_srvid *pid_srvid, int *status) +{ + struct ctdb_req_control request; + struct ctdb_reply_control *reply; + int ret; + + ctdb_req_control_check_pid_srvid(&request, pid_srvid); + ret = ctdb_client_control(mem_ctx, ev, client, destnode, timeout, + &request, &reply); + if (ret != 0) { + DEBUG(DEBUG_ERR, + ("Control CHECK_PID_SRVID failed to node %u, ret=%d\n", + destnode, ret)); + return ret; + } + + ret = ctdb_reply_control_check_pid_srvid(reply, status); + if (ret != 0) { + DEBUG(DEBUG_ERR, + ("Control CHECK_PID_SRVID failed, ret=%d\n", ret)); + return ret; + } + + return 0; +} diff --git a/ctdb/client/client_sync.h b/ctdb/client/client_sync.h index 99a886ae050..c07edf6caf9 100644 --- a/ctdb/client/client_sync.h +++ b/ctdb/client/client_sync.h @@ -476,6 +476,11 @@ int ctdb_ctrl_db_attach_replicated(TALLOC_CTX *mem_ctx, int destnode, struct timeval timeout, const char *db_name, uint32_t *db_id); +int ctdb_ctrl_check_pid_srvid(TALLOC_CTX *mem_ctx, struct tevent_context *ev, + struct ctdb_client_context *client, + int destnode, struct timeval timeout, + struct ctdb_pid_srvid *pid_srvid, int *status); + /* from client/client_message_sync.c */ int ctdb_message_recd_update_ip(TALLOC_CTX *mem_ctx, struct tevent_context *ev, |