mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
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)
This commit is contained in:
parent
7f02e16143
commit
2c0c94782a
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user