registry: use dbwrap_fetch_bystring() in regdb_fetch_keys().
authorMichael Adam <obnox@samba.org>
Tue, 29 Apr 2008 13:16:10 +0000 (15:16 +0200)
committerMichael Adam <obnox@samba.org>
Wed, 30 Apr 2008 10:42:31 +0000 (12:42 +0200)
instead of using regdb->fetch and constructing tdb data
from the registry key string by hand.

Michael
(This used to be commit 87a58140f0073dfb5b18fb43655b255aebafbd02)

source3/registry/reg_backend_db.c

index bd28eb32413d698c50535aa9f99d426eb15c30f3..7d7f5c8eecc4cbbb8ea7d2bdc156c6f29430c8b7 100644 (file)
@@ -728,7 +728,6 @@ int regdb_fetch_keys(const char *key, REGSUBKEY_CTR *ctr)
        int i;
        fstring subkeyname;
        int ret = -1;
-       int dbret = -1;
        TALLOC_CTX *frame = talloc_stackframe();
        TDB_DATA value;
 
@@ -748,10 +747,7 @@ int regdb_fetch_keys(const char *key, REGSUBKEY_CTR *ctr)
 
        ctr->seqnum = regdb_get_seqnum();
 
-       dbret = regdb->fetch(regdb, frame, string_term_tdb_data(path), &value);
-       if (dbret != 0) {
-               goto fail;
-       }
+       value = dbwrap_fetch_bystring(regdb, frame, path);
 
        buf = value.dptr;
        buflen = value.dsize;