diff options
author | Michael Adam <obnox@samba.org> | 2013-04-22 10:21:02 -0400 |
---|---|---|
committer | Amitay Isaacs <amitay@gmail.com> | 2013-04-24 18:46:22 +1000 |
commit | 885d6312fab51384dd2219fd266e5ea9b15fe628 (patch) | |
tree | be36162e165575d023bc4b8a35c771a28a80ba95 /ctdb/client | |
parent | 016522fe29ea6cbca989e87cde2e44793aa3e46b (diff) | |
download | samba-885d6312fab51384dd2219fd266e5ea9b15fe628.tar.gz samba-885d6312fab51384dd2219fd266e5ea9b15fe628.tar.xz samba-885d6312fab51384dd2219fd266e5ea9b15fe628.zip |
client: fix ctdb_control() to be able to cope with CTDB_CTRL_FLAG_NOREPLY
This was apparently not used before in this context, and the bug hence
not detected. It becomes necessary when ctdb_local_schedule_for_deletion()
is called from a client ctdbd (the vacuuming child), hence needs to send
the SCHEDULE_FOR_DELETION control to its parent.
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-By: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit e72a5e11845fe445baaee4730bb0bea8588ee9e3)
Diffstat (limited to 'ctdb/client')
-rw-r--r-- | ctdb/client/ctdb_client.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ctdb/client/ctdb_client.c b/ctdb/client/ctdb_client.c index 76780b0b5ab..2ae89582f55 100644 --- a/ctdb/client/ctdb_client.c +++ b/ctdb/client/ctdb_client.c @@ -1140,6 +1140,17 @@ int ctdb_control(struct ctdb_context *ctdb, uint32_t destnode, uint64_t srvid, state = ctdb_control_send(ctdb, destnode, srvid, opcode, flags, data, mem_ctx, timeout, errormsg); + + /* FIXME: Error conditions in ctdb_control_send return NULL without + * setting errormsg. So, there is no way to distinguish between sucess + * and failure when CTDB_CTRL_FLAG_NOREPLY is set */ + if (flags & CTDB_CTRL_FLAG_NOREPLY) { + if (status != NULL) { + *status = 0; + } + return 0; + } + return ctdb_control_recv(ctdb, state, mem_ctx, outdata, status, errormsg); } |