diff options
-rw-r--r-- | source3/include/proto.h | 1 | ||||
-rw-r--r-- | source3/registry/reg_objects.c | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h index 84ab0efbfe..4d5e2b5a22 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -5131,6 +5131,7 @@ WERROR registry_init_smbconf(const char *keyname); WERROR regsubkey_ctr_init(TALLOC_CTX *mem_ctx, struct regsubkey_ctr **ctr); WERROR regsubkey_ctr_set_seqnum(struct regsubkey_ctr *ctr, int seqnum); +int regsubkey_ctr_get_seqnum(struct regsubkey_ctr *ctr); WERROR regsubkey_ctr_addkey( struct regsubkey_ctr *ctr, const char *keyname ); int regsubkey_ctr_delkey( struct regsubkey_ctr *ctr, const char *keyname ); bool regsubkey_ctr_key_exists( struct regsubkey_ctr *ctr, const char *keyname ); diff --git a/source3/registry/reg_objects.c b/source3/registry/reg_objects.c index 20bc906cfe..f97ca69139 100644 --- a/source3/registry/reg_objects.c +++ b/source3/registry/reg_objects.c @@ -61,6 +61,15 @@ WERROR regsubkey_ctr_set_seqnum(struct regsubkey_ctr *ctr, int seqnum) return WERR_OK; } +int regsubkey_ctr_get_seqnum(struct regsubkey_ctr *ctr) +{ + if (ctr == NULL) { + return -1; + } + + return ctr->seqnum; +} + /*********************************************************************** Add a new key to the array **********************************************************************/ |