Add a function libnet_conf_get_seqnum() to the libnet_conf API.
authorMichael Adam <obnox@samba.org>
Mon, 18 Feb 2008 17:21:14 +0000 (18:21 +0100)
committerMichael Adam <obnox@samba.org>
Tue, 19 Feb 2008 08:09:04 +0000 (09:09 +0100)
This is to provide a change sequence number to users, so that they
can use it to detect change in the config and trigger a reload.

Michael

source/libnet/libnet_conf.c

index c3872b68defd4513aa50c50ffdad4e0954af3a41..688097bc5e23ba6d570ec75437663a2780b4fc68 100644 (file)
@@ -481,6 +481,19 @@ void libnet_conf_close(struct libnet_conf_ctx *ctx)
        TALLOC_FREE(ctx);
 }
 
+/**
+ * Get the change sequence number of the given service/parameter.
+ *
+ * NOTE: Currently, for registry configuration, this is independent
+ * of the service and parameter, it returns the registry-sequence
+ * number.
+ */
+uint64_t libnet_conf_get_seqnum(struct libnet_conf_ctx *ctx,
+                               const char *service, const char *param)
+{
+       return (uint64_t)regdb_get_seqnum();
+}
+
 /**
  * Drop the whole configuration (restarting empty).
  */