From c6afe22b92cbe717f5ade278b473f03ae328a05e Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 15 May 2007 10:17:16 +1000 Subject: [PATCH] added a control to get the local vnn (This used to be ctdb commit 0b109f574b710f290372512d0694290ea7cd4368) --- ctdb/common/ctdb_control.c | 9 +++++---- ctdb/include/ctdb_private.h | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ctdb/common/ctdb_control.c b/ctdb/common/ctdb_control.c index fab66c855af..f6ff4975139 100644 --- a/ctdb/common/ctdb_control.c +++ b/ctdb/common/ctdb_control.c @@ -132,13 +132,14 @@ static int32_t ctdb_control_dispatch(struct ctdb_context *ctdb, return 0; } - case CTDB_CONTROL_GET_RECMASTER: { + case CTDB_CONTROL_GET_RECMASTER: return ctdb->recovery_master; - } - case CTDB_CONTROL_GET_PID: { + case CTDB_CONTROL_GET_PID: return getpid(); - } + + case CTDB_CONTROL_GET_VNN: + return ctdb->vnn; case CTDB_CONTROL_CONFIG: { CHECK_CONTROL_DATA_SIZE(0); diff --git a/ctdb/include/ctdb_private.h b/ctdb/include/ctdb_private.h index 2981a7861d5..6f1ef7aa381 100644 --- a/ctdb/include/ctdb_private.h +++ b/ctdb/include/ctdb_private.h @@ -352,6 +352,7 @@ enum ctdb_controls {CTDB_CONTROL_PROCESS_EXISTS, CTDB_CONTROL_SET_RECMASTER, CTDB_CONTROL_FREEZE, CTDB_CONTROL_THAW, + CTDB_CONTROL_GET_VNN, }; -- 2.47.3