From 2c0c94782aaade9cdf552291a00780bfce9530a0 Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Mon, 27 Aug 2007 15:03:52 +1000 Subject: [PATCH] make the ctdb shutdown command use the async _send() function to send the shutdown command and return success to the caller if the _send() was successful (This used to be ctdb commit 6bacaf8c7a96044708a6eda10cc8576adb7f5f79) --- ctdb/client/ctdb_client.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/ctdb/client/ctdb_client.c b/ctdb/client/ctdb_client.c index 91351befd49..85c55971342 100644 --- a/ctdb/client/ctdb_client.c +++ b/ctdb/client/ctdb_client.c @@ -972,13 +972,12 @@ int ctdb_ctrl_statistics(struct ctdb_context *ctdb, uint32_t destnode, struct ct */ int ctdb_ctrl_shutdown(struct ctdb_context *ctdb, struct timeval timeout, uint32_t destnode) { - int ret; - int32_t res; + struct ctdb_client_control_state *state; - ret = ctdb_control(ctdb, destnode, 0, - CTDB_CONTROL_SHUTDOWN, CTDB_CTRL_FLAG_NOREPLY, tdb_null, - NULL, NULL, &res, &timeout, NULL); - if (ret != 0) { + state = ctdb_control_send(ctdb, destnode, 0, + CTDB_CONTROL_SHUTDOWN, 0, tdb_null, + NULL, NULL, &timeout, NULL); + if (state == NULL) { DEBUG(0,(__location__ " ctdb_control for shutdown failed\n")); return -1; } -- 2.47.3