s3:registry:reg_objects: add regval_ctr_get_seqnum()
authorMichael Adam <obnox@samba.org>
Sun, 23 May 2010 20:53:44 +0000 (22:53 +0200)
committerMichael Adam <obnox@samba.org>
Tue, 25 May 2010 08:35:28 +0000 (10:35 +0200)
source3/include/reg_objects.h
source3/registry/reg_objects.c

index 0cfb25d1f631f2761a312c48cd37c60dbf29e83e..03483d86abeb845409a6f9e14d09ea0a043ef444 100644 (file)
@@ -195,6 +195,7 @@ int regval_ctr_copyvalue(struct regval_ctr *ctr, struct regval_blob *val);
 int regval_ctr_delvalue(struct regval_ctr *ctr, const char *name);
 struct regval_blob* regval_ctr_getvalue(struct regval_ctr *ctr,
                                        const char *name);
+int regval_ctr_get_seqnum(struct regval_ctr *ctr);
 uint32 regval_dword(struct regval_blob *val);
 const char *regval_sz(struct regval_blob *val);
 
index 148fdee7f2709bb644180929be5c34164a154000..b52d85fa4f85fd8c6df1d156609028057564e892 100644 (file)
@@ -603,6 +603,15 @@ struct regval_blob* regval_ctr_getvalue(struct regval_ctr *ctr,
        return NULL;
 }
 
+int regval_ctr_get_seqnum(struct regval_ctr *ctr)
+{
+       if (ctr == NULL) {
+               return -1;
+       }
+
+       return ctr->seqnum;
+}
+
 /***********************************************************************
  return the data_p as a uint32
  **********************************************************************/