summaryrefslogtreecommitdiff
path: root/ctdb/client
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2017-04-19 11:46:48 +1000
committerMartin Schwenke <martins@samba.org>2017-06-07 16:05:26 +0200
commitbe0a8d6c5fcd4c31224d38523d8d4c03138a9793 (patch)
tree3fb0c57c5cda71a32a476da65129f8a7cefb78c9 /ctdb/client
parent8e3ed87cacca41f113072d9b8eb6ff328ee73ba1 (diff)
downloadsamba-be0a8d6c5fcd4c31224d38523d8d4c03138a9793.tar.gz
ctdb-client: Move ctdb_ctrl_modflags() to ctdb tool
This function is only required by the tool. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
Diffstat (limited to 'ctdb/client')
-rw-r--r--ctdb/client/client.h5
-rw-r--r--ctdb/client/client_util.c34
2 files changed, 0 insertions, 39 deletions
diff --git a/ctdb/client/client.h b/ctdb/client/client.h
index 64fe75da5a0..c55e3120005 100644
--- a/ctdb/client/client.h
+++ b/ctdb/client/client.h
@@ -833,11 +833,6 @@ int list_of_connected_nodes(struct ctdb_node_map *nodemap,
uint32_t exclude_pnn,
TALLOC_CTX *mem_ctx, uint32_t **pnn_list);
-int ctdb_ctrl_modflags(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
- struct ctdb_client_context *client,
- uint32_t destnode, struct timeval timeout,
- uint32_t set, uint32_t clear);
-
struct ctdb_server_id ctdb_client_get_server_id(
struct ctdb_client_context *client,
uint32_t task_id);
diff --git a/ctdb/client/client_util.c b/ctdb/client/client_util.c
index 1ba1e7d10e8..511778634dc 100644
--- a/ctdb/client/client_util.c
+++ b/ctdb/client/client_util.c
@@ -78,40 +78,6 @@ int list_of_connected_nodes(struct ctdb_node_map *nodemap,
mem_ctx, pnn_list);
}
-int ctdb_ctrl_modflags(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
- struct ctdb_client_context *client,
- uint32_t destnode, struct timeval timeout,
- uint32_t set, uint32_t clear)
-{
- struct ctdb_node_map *nodemap;
- struct ctdb_node_flag_change flag_change;
- struct ctdb_req_control request;
- uint32_t *pnn_list;
- int ret, count;
-
- ret = ctdb_ctrl_get_nodemap(mem_ctx, ev, client, destnode,
- tevent_timeval_zero(), &nodemap);
- if (ret != 0) {
- return ret;
- }
-
- flag_change.pnn = destnode;
- flag_change.old_flags = nodemap->node[destnode].flags;
- flag_change.new_flags = flag_change.old_flags | set;
- flag_change.new_flags &= ~clear;
-
- count = list_of_connected_nodes(nodemap, -1, mem_ctx, &pnn_list);
- if (count == -1) {
- return ENOMEM;
- }
-
- ctdb_req_control_modify_flags(&request, &flag_change);
- ret = ctdb_client_control_multi(mem_ctx, ev, client, pnn_list, count,
- tevent_timeval_zero(), &request,
- NULL, NULL);
- return ret;
-}
-
struct ctdb_server_id ctdb_client_get_server_id(
struct ctdb_client_context *client,
uint32_t task_id)