This is useful in order to print useful debug messages in future,
e.g. after a failing if (CLUSTER_LEVEL_ACTIVE(x, y))' check.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
SMB_ASSERT(CLUSTER_LEVEL_ACTIVE(LATEST, MAX));
}
+/*
+ * Return the global functional level, even if its
+ * not valid yet.
+ */
+const struct cluster_level_active *cluster_level_global_active(void)
+{
+ cluster_level_range_asserts();
+
+ return &global_level_activated;
+}
+
/*
* This will allow code like this:
*
void cluster_level_activate(const struct cluster_level_active *level);
void cluster_level_activate_latest(void);
+const struct cluster_level_active *cluster_level_global_active(void);
+
/*
* We use checks like 'if (CLUSTER_LEVEL_ACTIVE(1, 0))' in
* order to avoid long lines when using the