summaryrefslogtreecommitdiff
path: root/ctdb/client
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2017-08-04 14:22:31 +1000
committerMartin Schwenke <martins@samba.org>2017-08-14 09:01:21 +0200
commit578a1b1757687719c49772fc43a1ac89c6c846ad (patch)
tree53d72590c38efcd20c7c059d0e05909433f22450 /ctdb/client
parent79f5d058469c62b92b5e6227230597a30b41353a (diff)
downloadsamba-578a1b1757687719c49772fc43a1ac89c6c846ad.tar.gz
ctdb-client: Server id exists should check if the pid still exists
This matches what the older client code and samba does. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
Diffstat (limited to 'ctdb/client')
-rw-r--r--ctdb/client/client_util.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ctdb/client/client_util.c b/ctdb/client/client_util.c
index f5d03095189..c68135f0af9 100644
--- a/ctdb/client/client_util.c
+++ b/ctdb/client/client_util.c
@@ -117,17 +117,17 @@ int ctdb_server_id_exists(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
struct ctdb_client_context *client,
struct ctdb_server_id *sid, bool *exists)
{
- uint8_t *result;
+ int result;
int ret;
- ret = ctdb_ctrl_check_srvids(mem_ctx, ev, client, sid->vnn,
- tevent_timeval_zero(),
- &sid->unique_id, 1, &result);
+ ret = ctdb_ctrl_process_exists(mem_ctx, ev, client, sid->vnn,
+ tevent_timeval_zero(),
+ sid->pid, &result);
if (ret != 0) {
return ret;
}
- if (result[0] == 1) {
+ if (result == 1) {
*exists = true;
} else {
*exists = false;