From: Ronnie Sahlberg Date: Mon, 27 Aug 2007 05:03:52 +0000 (+1000) Subject: make the ctdb shutdown command use the async _send() function to send X-Git-Tag: tevent-0.9.20~348^2~2435^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2c0c94782aaade9cdf552291a00780bfce9530a0;p=thirdparty%2Fsamba.git 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) --- 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; }