diff options
author | Martin Schwenke <martin@meltin.net> | 2018-01-18 16:41:19 +1100 |
---|---|---|
committer | Amitay Isaacs <amitay@samba.org> | 2020-08-18 05:02:25 +0000 |
commit | 3324dd272c7dafa92cd9c3fd0af8f50084bcdaaa (patch) | |
tree | c60f2af10f6830bd0fcdc100cebb24439daf15cd /ctdb | |
parent | d2d90f250214582d7124b8137aa2cf5032b2f285 (diff) | |
download | samba-3324dd272c7dafa92cd9c3fd0af8f50084bcdaaa.tar.gz |
ctdb-recoverd: Change signature of get_remote_nodemaps()
Change 1st argument to a rec context, since this will be needed later.
Drop the nodemap argument and access it via rec->nodemap instead.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14466
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb')
-rw-r--r-- | ctdb/server/ctdb_recoverd.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/ctdb/server/ctdb_recoverd.c b/ctdb/server/ctdb_recoverd.c index 5d6cfa2d009..b08950a17bc 100644 --- a/ctdb/server/ctdb_recoverd.c +++ b/ctdb/server/ctdb_recoverd.c @@ -2241,15 +2241,15 @@ static void async_getnodemap_callback(struct ctdb_context *ctdb, } -static int get_remote_nodemaps(struct ctdb_context *ctdb, +static int get_remote_nodemaps(struct ctdb_recoverd *rec, TALLOC_CTX *mem_ctx, - struct ctdb_node_map_old *nodemap, struct ctdb_node_map_old **remote_nodemaps) { + struct ctdb_context *ctdb = rec->ctdb; uint32_t *nodes; int ret; - nodes = list_of_active_nodes(ctdb, nodemap, mem_ctx, true); + nodes = list_of_active_nodes(ctdb, rec->nodemap, mem_ctx, true); ret = ctdb_client_async_control(ctdb, CTDB_CONTROL_GET_NODEMAP, @@ -2592,10 +2592,11 @@ static void main_loop(struct ctdb_context *ctdb, struct ctdb_recoverd *rec, for(i=0; i<nodemap->num; i++) { remote_nodemaps[i] = NULL; } - if (get_remote_nodemaps(ctdb, mem_ctx, nodemap, remote_nodemaps) != 0) { - DEBUG(DEBUG_ERR,(__location__ " Failed to read remote nodemaps\n")); + ret = get_remote_nodemaps(rec, mem_ctx, remote_nodemaps); + if (ret != 0) { + DBG_ERR("Failed to read remote nodemaps\n"); return; - } + } /* verify that all other nodes have the same nodemap as we have */ |