]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
added a control to get the local vnn
authorAndrew Tridgell <tridge@samba.org>
Tue, 15 May 2007 00:17:16 +0000 (10:17 +1000)
committerAndrew Tridgell <tridge@samba.org>
Tue, 15 May 2007 00:17:16 +0000 (10:17 +1000)
(This used to be ctdb commit 0b109f574b710f290372512d0694290ea7cd4368)

ctdb/common/ctdb_control.c
ctdb/include/ctdb_private.h

index fab66c855af6e661480860f4f4e4670b454eea35..f6ff49751390aaf7a8b2620505c09177fd908aeb 100644 (file)
@@ -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);
index 2981a7861d551496feb61ce77cfc2966b2797fff..6f1ef7aa38111d5dd5ec707d9461f4e358cd5777 100644 (file)
@@ -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,
 };