struct regsubkey_ctr *ctr);
static bool regdb_store_keys_internal(struct db_context *db, const char *key,
struct regsubkey_ctr *ctr);
+static int regdb_fetch_values_internal(struct db_context *db, const char* key,
+ struct regval_ctr *values);
/* List the deepest path into the registry. All part components will be created.*/
goto done;
}
- regdb_fetch_values(builtin_registry_values[i].path, values);
+ regdb_fetch_values_internal(regdb,
+ builtin_registry_values[i].path,
+ values);
if (!regval_ctr_key_exists(values,
builtin_registry_values[i].valuename))
{
goto fail;
}
- regdb_fetch_values(builtin_registry_values[i].path, values);
+ regdb_fetch_values_internal(regdb,
+ builtin_registry_values[i].path,
+ values);
/* preserve existing values across restarts. Only add new ones */
released by the caller.
***********************************************************************/
-int regdb_fetch_values(const char* key, struct regval_ctr *values)
+static int regdb_fetch_values_internal(struct db_context *db, const char* key,
+ struct regval_ctr *values)
{
char *keystr = NULL;
TALLOC_CTX *ctx = talloc_stackframe();
DEBUG(10,("regdb_fetch_values: Looking for value of key [%s] \n", key));
- if (!regdb_key_exists(regdb, key)) {
+ if (!regdb_key_exists(db, key)) {
goto done;
}
goto done;
}
- values->seqnum = regdb_get_seqnum();
+ values->seqnum = db->get_seqnum(db);
- value = regdb_fetch_key_internal(regdb, ctx, keystr);
+ value = regdb_fetch_key_internal(db, ctx, keystr);
if (!value.dptr) {
/* all keys have zero values by default */
return ret;
}
+int regdb_fetch_values(const char* key, struct regval_ctr *values)
+{
+ return regdb_fetch_values_internal(regdb, key, values);
+}
+
bool regdb_store_values(const char *key, struct regval_ctr *values)
{
TDB_DATA old_data, data;