From: Martin Schwenke Date: Thu, 18 Jan 2018 05:41:19 +0000 (+1100) Subject: ctdb-recoverd: Change signature of get_remote_nodemaps() X-Git-Tag: samba-4.11.14~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=942db2b3d27236506c3a98ce2cc8f4975e01aed2;p=thirdparty%2Fsamba.git 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 Reviewed-by: Amitay Isaacs (cherry picked from commit 3324dd272c7dafa92cd9c3fd0af8f50084bcdaaa) --- diff --git a/ctdb/server/ctdb_recoverd.c b/ctdb/server/ctdb_recoverd.c index 2519e93dcfc..ca298f44dcc 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; inum; 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 */