ctdb-recoverd: Use rec->pnn everywhere
authorMartin Schwenke <martin@meltin.net>
Wed, 8 Dec 2021 09:25:46 +0000 (20:25 +1100)
committerMartin Schwenke <martins@samba.org>
Mon, 17 Jan 2022 10:21:32 +0000 (10:21 +0000)
commit2ee6763c7d9a8e347c0a98f918ad39f62222df31
treecf24555206d08f2369b513d865323b07ccb22374
parent4af3b10a378ea614f926c23570ec91334e2c6408
ctdb-recoverd: Use rec->pnn everywhere

This is currently referenced in a number of inconsistent
ways, including:

* pnn
* rec->ctdb->pnn
* ctdb->pnn
* ctdb_get_pnn(ctdb)
* ctdb_get_pnn(rec->ctdb)

The first of these always requires some thought about the context - is
this the node PNN or some other PNN (e.g. argument to function)?

rec->pnn is now always used when referring to the recovery daemon's
PNN.

Doing this also reduces reliance on struct ctdb_context internals.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/server/ctdb_recoverd.c