diff options
author | Martin Schwenke <martin@meltin.net> | 2019-06-22 05:53:15 +1000 |
---|---|---|
committer | Amitay Isaacs <amitay@samba.org> | 2019-07-05 05:03:23 +0000 |
commit | 010c1d77cd7e192b1fff39b7b91fccbdbbf4a786 (patch) | |
tree | b254307ce73b7f7eb5cc44defe5d851496745a61 /ctdb/include | |
parent | 888ecc74ed1a6617b8a0a4450b671cf5f6d88f8b (diff) | |
download | samba-010c1d77cd7e192b1fff39b7b91fccbdbbf4a786.tar.gz |
ctdb-daemon: Replace function ctdb_ip_to_nodeid() with ctdb_ip_to_pnn()
Node ID is a poorly defined concept, indicating the slot in the node
map where the IP address was found. This signed value also ends up
compared to num_nodes, which is unsigned, producing unwanted warnings.
Just return the PNN because this what both callers really want.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb/include')
-rw-r--r-- | ctdb/include/ctdb_private.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ctdb/include/ctdb_private.h b/ctdb/include/ctdb_private.h index 9eec244c4f2..7ea7691a36b 100644 --- a/ctdb/include/ctdb_private.h +++ b/ctdb/include/ctdb_private.h @@ -841,7 +841,8 @@ void ctdb_stop_recoverd(struct ctdb_context *ctdb); int ctdb_set_transport(struct ctdb_context *ctdb, const char *transport); -int ctdb_ip_to_nodeid(struct ctdb_context *ctdb, const ctdb_sock_addr *nodeip); +uint32_t ctdb_ip_to_pnn(struct ctdb_context *ctdb, + const ctdb_sock_addr *nodeip); void ctdb_load_nodes_file(struct ctdb_context *ctdb); |