summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2011-08-17 10:06:07 +0200
committerMichael Adam <obnox@samba.org>2011-10-11 14:17:56 +0200
commit81258c01b84de488cb3d33139357fe839c1f3323 (patch)
tree9ff288244a9a01bacb8de2f44cbe34fe5fc5e57a
parent0b7108b342c5ae6fefdd76b3dad1a7b17f6f835b (diff)
downloadsamba-81258c01b84de488cb3d33139357fe839c1f3323.tar.gz
samba-81258c01b84de488cb3d33139357fe839c1f3323.tar.bz2
samba-81258c01b84de488cb3d33139357fe839c1f3323.zip
s3:serverid: use dbwrap_traverse() in serverid_traverse()
This also fixes the return value: Originally, the int returned by the traverse method, which is the count of the traverse was casted into a bool return value.
-rw-r--r--source3/lib/serverid.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/lib/serverid.c b/source3/lib/serverid.c
index 7e56301bf2..ee8ab32c50 100644
--- a/source3/lib/serverid.c
+++ b/source3/lib/serverid.c
@@ -350,6 +350,7 @@ bool serverid_traverse(int (*fn)(struct db_record *rec,
{
struct db_context *db;
struct serverid_traverse_state state;
+ NTSTATUS status;
db = serverid_db();
if (db == NULL) {
@@ -357,5 +358,7 @@ bool serverid_traverse(int (*fn)(struct db_record *rec,
}
state.fn = fn;
state.private_data = private_data;
- return db->traverse(db, serverid_traverse_fn, &state);
+
+ status = dbwrap_traverse(db, serverid_traverse_fn, &state, NULL);
+ return NT_STATUS_IS_OK(status);
}