]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
make the ctdb shutdown command use the async _send() function to send
authorRonnie Sahlberg <sahlberg@ronnie>
Mon, 27 Aug 2007 05:03:52 +0000 (15:03 +1000)
committerRonnie Sahlberg <sahlberg@ronnie>
Mon, 27 Aug 2007 05:03:52 +0000 (15:03 +1000)
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

index 91351befd492d308d2f090b6598b7e037be5ede4..85c55971342cf3cdf04ca7f82427c732622f3e4b 100644 (file)
@@ -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;
        }