From: Andrew Tridgell Date: Tue, 15 May 2007 00:17:16 +0000 (+1000) Subject: added a control to get the local vnn X-Git-Tag: tevent-0.9.20~348^2~2728 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c6afe22b92cbe717f5ade278b473f03ae328a05e;p=thirdparty%2Fsamba.git added a control to get the local vnn (This used to be ctdb commit 0b109f574b710f290372512d0694290ea7cd4368) --- 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, };